Sybase supports numerous formats for date and timestamp datatypes.
Use the info below to create a custom format for your date and timestamp datatypes.
Character | Description |
---|---|
%a | The day of the week, using the locale's weekday names. You can specify either the abbreviated or full name. |
%A | Equivalent to %a. |
%b | The month, using the locale's month names. You can specify either the abbreviated or full name. |
%B | Equivalent to %b. |
%c | The locale's appropriate date and time representation. |
%C | The century number [00,99]. Leading zeros are permitted but not required. |
%d | The day of the month [01,31]. Leading zeros are permitted but not required. |
%D | The date as %m / %d / %y. |
%e | Equivalent to %d. |
%h | Equivalent to %b. |
%H | The hour (24-hour clock) [00,23]. Leading zeros are permitted but not required. |
%I | The hour (12-hour clock) [01,12]. Leading zeros are permitted but not required. |
%j | The day number of the year [001,366]. Leading zeros are permitted but not required. |
%m | The month number [01,12]. Leading zeros are permitted but not required. |
%M | The minute [00,59]. Leading zeros are permitted but not required. |
%n | Any white space. |
%p | The locale's equivalent of a.m or p.m. |
%r | 12-hour clock time using the AM/PM notation. |
%R | The time as %H : %M. |
%S | The seconds [00,60]. Leading zeros are permitted but not required. |
%t | Any white space. |
%T | The time as %H : %M : %S. |
%U | The week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. Leading zeros are permitted but not required. |
%w | The weekday as a decimal number [0,6], with 0 representing Sunday. Leading zeros are permitted but not required. |
%W | The week number of the year (Monday as the first day of the week) as a decimal number [00,53]. Leading zeros are permitted but not required. |
%x | The date, using the locale's date format. |
%X | The time, using the locale's time format. |
%y | The year within the century. When a century is not otherwise specified, values in the range [69,99] shall refer to years 1969 to 1999 inclusive, and values in the range [00,68] shall refer to years 2000 to 2068 inclusive. Leading zeros are permitted but not required. |
%Y | The year, including the century. For example, 1988. |
%% | Replaced by %. |