Skip to content
Tags

Dates sous Sybase

September 2, 2008

Find below the list of the date formats in SYBASE ASE. This information can be retrieved on Internet but sometimes it is hard to find an exhaustive list. I used SYBASE 15 for creating the list below (I’ve tested all the cases).

For your information, codes above 100 give the year on 4 digits. To have only 2 digits, substract 100. The example I selected is perfect to see where are the swap of the day and the month (July 9th  and not September, 7th!).

Note: “ZZ” is to specify “AM” or “PM” (in uppercase) and “zz” is to specify “am” or “pm” (in lowercase). “hh” is used for hours based on 12 notation and “HH” for hours from 0 to 23. “sss” are for milliseconds.

Code Standard Format Sample (July 9th 2008, 22:00:07.956)
17 Time hh:MMZZ 10:00PM
18 Time HH:MM 22:00
19 Time hh:MM:SS.sssZZ 10:00:07:956PM
20 Time HH:MM:SS:sss 22:00:07:956
21 yy/mm/dd HH:MM:SS 08/07/09 22:00:07
22 yy/mm/dd hh:MMZZ 08/07/09 10:00PM
23 ISO Date+Time yyyy-mm-ddTHH:MM:SS 2008-07-09T22:00:07
100 Default mon dd yyyy hh:mmZZ Jul 9 2008 10:00AM
101 USA mm/dd/yyyy 07/09/2008
102 SQL Standard yyyy.mm.dd 2008.07.09
103 English/French dd/mm/yyyy 09/07/2008
104 German dd/mm/yyyy 09.07.2008
105 dd-mm-yyyy 09-07-2008
106 dd mon yy 09 Jul 2008
107 mon dd, yy Jul 09, 2008
107 mon dd, yy Jul 09, 2008
108 HH:MM:SS 22:00:07
109 Default + milliseconds mon dd yyyy hh:MM:SS:sssZZ Jul 9 2008 10:00:07:956PM
110 USA mm-dd-yyyy 07-09-2008
111 Japan yyyy/mm/dd 2008/07/09
112 ISO yyyymmdd 20080709
113 yyyy/dd/mm 2008/09/07
114 mm/yyyy/dd 07/2008/09
115 dd/yyyy/mm 09/2008/07
116 mon d yyyy HH:MM:SS Jul 9 2008 22:00:07
117 yyyy/mm/dd HH:MM:SS 2008/07/09 22:00:07
118 yyyy/mm/dd hh:MMZZ 2008/07/09 10:00PM
Advertisements

From → Other

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: