Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    41

    Unanswered: system date in 3 formats

    Hello,

    I came across one question where I have been asked to list the system dates in three different formats:

    I used the following two formats but I'm wondering what could be the third one?

    Format #1: SYSDATE

    SYSDATE

    FORMAT #2: SYSTIMESTAMP

    SYSTIMESTAMP

    I'm using Oracle 11g. Please let me know if above format are correct or not and what will be the third format in this case?

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    SYSDATE can be display either in 24 Hour format or AM/PM format
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    "Three formats" made me think about this:
    Code:
    SQL> select to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss') ver_1,
      2         to_char(sysdate, 'dd-mon-yyyy') ver_2,
      3         to_char(sysdate, 'fmday, dd month yyyy') ver_3
      4  from dual;
    
    VER_1               VER_2       VER_3
    ------------------- ----------- ----------------------------
    20.04.2013 23:26:35 20-apr-2013 saturday, 20 april 2013
    
    SQL>
    (with indefinite variety of options).

Posting Permissions

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