Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    21

    Unanswered: extract day of week

    hi

    to format a time_stamp column when querying the db, we can use to_char(time_stamp, 'YYYY-MM-DD') to give us the output in this format. (2003-08-21)

    Is there a similar command to extract the day of the week? What I'm trying to get is (21-Thurs)

    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Day of the week

    select to_char(SYSDATE,'YYYY MM DAY') from dual;

    TO_CHAR(SYSDATE,'YYYYMMDAY')
    ----------------------------
    2003 08 THURSDAY


    select to_char(SYSDATE,'YYYY MM DY') from dual;

    TO_CHAR(SYSDATE,'YYYYMMDAY')
    ----------------------------
    2003 08 THURSDAY

  3. #3
    Join Date
    Jul 2003
    Posts
    21
    is there a way to get the abbreviated day?

    like fri, sat, sun ?
    thanks

  4. #4
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Abbreviated day of the week

    select to_char(SYSDATE,'YYYY MM DY') from dual;

    Thanx and Regards
    Aruneesh

Posting Permissions

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