dcsimg
Results 1 to 2 of 2

Thread: date function

  1. #1
    Join Date
    Mar 2011
    Posts
    1

    date function

    Hi all,
    How do i get first day of next month .

    regards
    kashi

  2. #2
    Join Date
    Feb 2012
    Posts
    3
    select TO_DATE('01'||TO_CHAR(ADD_MONTHS(SYSDATE,1),'MMYYY Y'),'DDMMYYYY') FROM DUAL

    In Words:
    Add_monts adds one month to the current date.
    From the result we take the month and year oprtion with the to_char statement. Next we concatenate the 1st to the calculated month and year portion and put this back into a date field.
    Functions everytime

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •