Date and Timestamp Formats for Output Adapters

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 locale's abbreviated weekday name.
%A The locale's full weekday name.
%b The locale's abbreviated month name.
%B The locale's full month name.
%c The locale's appropriate date and time representation.
%C The year divided by 100, and truncated to an integer as a decimal number [00,99].
%d The day of the month as a decimal number [01,31].
%D Equivalent to %m / %d / %y.
%e The day of the month as a decimal number [1,31]. A single digit is preceded by a space.
%F Equivalent to %Y - %m - %d. This is the ISO 8601:2000 standard date format.
%g The last 2 digits of the week-based year, as a decimal number [00,99].
%G The week-based year as a decimal number. For example, 1977.
%h Equivalent to %b.
%H The hour (24-hour clock) as a decimal number [00,23].
%I The hour (12-hour clock) as a decimal number [01,12].
%j The day of the year as a decimal number [001,366].
%m The month as a decimal number [01,12].
%M The minute as a decimal number [00,59].
%n A <newline>.
%p The locale's equivalent of either a.m. or p.m.
%r The time in a.m. and p.m. notation.
%R The time in 24-hour notation (%H : %M).
%S The second as a decimal number [00,60].
%t A <tab>.
%T The time in the following format %H : %M : %S.
%u The weekday as a decimal number [1,7], with 1 representing Monday.
%U The week number of the year as a decimal number [00,53]. The first Sunday of January is the first day of week 1, and days in the new year before this are in week 0.
%V The week number of the year (Monday as the first day of the week) as a decimal number [01,53]. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1.

Both January 4th and the first Thursday of January are always in week 1.

%w The weekday as a decimal number [0,6], with 0 representing Sunday.
%W The week number of the year as a decimal number [00,53]. The first Monday of January is the first day of week 1, and days in the new year before this are in week 0.
%x The locale's appropriate date representation.
%X The locale's appropriate time representation.
%y The last two digits of the year as a decimal number [00,99].
%Y The year as a decimal number. For example, 1997.
%z The offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ), or by no characters if no time zone is determinable. For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich).
%Z The time zone name or abbreviation, or by no bytes if no time zone information exists.
%% Replaced by %.