If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Date format supported by db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-05, 08:23
sayali29 sayali29 is offline
Registered User
 
Join Date: Jan 2005
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 01-14-05, 08:57
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On