Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: Date format supported by db2

    Hi ,
    I m new to db2 .
    i m trying to use the timestamp to add date and time in the filed of a table .
    i m trying to insert date in the form of '17-Dec-2004' ,but i get some error .
    Does db2 support this kind of format .
    Please help me out .
    Thanks&Regards
    Sayali

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    No.

    Straight from the DB2 SQL Reference:

    Format Name Abbreviation Date Format Example
    International Standards Organization ISO yyyy-mm-dd 1991-10-27
    IBM USA standard USA mm/dd/yyyy 10/27/1991
    IBM European standard EUR dd.mm.yyyy 27.10.1991
    Japanese Industrial Standard Christian Era JIS yyyy-mm-dd 1991-10-27
    Site-defined LOC Depends on the territory code of the application --
    Time strings

    A string representation of a time is a string that starts with a digit and has a length of at least 4 characters. Trailing blanks may be included; a leading zero may be omitted from the hour part of the time, and seconds may be omitted entirely. If seconds are omitted, an implicit specification of 0 seconds is assumed. Thus, 13:30 is equivalent to 13:30:00.

    Valid string formats for times are listed in the following table. Each format is identified by name and associated abbreviation.
    Table 124. Formats for String Representations of Times Format Name Abbreviation Time Format Example
    International Standards Organization2 ISO hh.mm.ss 13.30.05
    IBM USA standard USA hh:mm AM or PM 1:30 PM
    IBM European standard EUR hh.mm.ss 13.30.05
    Japanese Industrial Standard Christian Era JIS hh:mm:ss 13:30:05
    Site-defined LOC Depends on the territory code of the application --


    complete string representation of a timestamp has the form yyyy-mm-dd-hh.mm.ss.nnnnnn

    Andy

Posting Permissions

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