DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Doubt

  1. #1
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    323
    Hi

    What is returned value "3" here.

    select to_char(sysdate,'DDD'),to_char(sysdate,'DD'),
    to_char(sysdate,'D')
    from dual;

    TO_ TO T
    --- -- -
    218 06 3

    Thanks In Advance
    Nagesh

  2. #2
    Join Date
    Jul 2002
    Location
    Lincolnshire, IL
    Posts
    203
    what is your actual sysdate?
    "Greatest Rewards come only with Greatest Commitments!"

  3. #3
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    323
    Originally posted by sandycrab
    what is your actual sysdate?
    SQL> select sysdate from dual;

    SYSDATE
    ---------
    06-AUG-02

    Thanks In Advance

    Nagesh

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by gnagesh
    Hi

    What is returned value "3" here.

    select to_char(sysdate,'DDD'),to_char(sysdate,'DD'),
    to_char(sysdate,'D')
    from dual;

    TO_ TO T
    --- -- -
    218 06 3

    Thanks In Advance
    "3" as an output of TO_CHAR(sysdate,'D') represent the day number of the week, ranging from 1 to 7. With your NLS settings the above expression returns

    1 .. Sunday
    2 .. Monday
    3 .. Tuesday
    .......
    7 .. Satturday

    This numbering is NLS_TERRITORY dependant, in some cases you get 1 for Monday and 7 for Sunday.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    323
    Hi all

    Thank You Very Much.

    Regards

    Nagesh

Posting Permissions

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


Click Here to Expand Forum to Full Width