INtime SDK Help
strftime, wcsftime
Note: locale support in INtime is limited to the "C" locale

Formats a time string.

#include <time.h>

size_t strftime (char *string, size_t maxsize, 
const char *format, const struct tm *timedate);

#include <wchar.h>

size_t wcsftime(wchar_t *string, size_t maxsize,
const wchar_t *format, const struct tm *timedate);

Parameters

string
Output string.
maxsize
Maximum length of string.
format
Format control string; normal characters and format specifications.
timedate
Time/date structure, TM.

Remarks

Format specifications have a preceding percent sign (%); preceding characters are copied unchanged to string. The LC_TIME category of the current locale affects the output formatting of strftime.

Format Description
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for the locale
%d Day of the month as a decimal number (01-31)
%H Hour in 24-hour format (00-23)
%I Hour in 12-hour format (01-12)
%j Day of the year as a decimal number (001-366)
%m Month as a decimal number (01-12)
%M Minute as a decimal number (00-59)
%p Current locale's AM/PM indicator for a 12-hour clock
%S Second as a decimal number (00-61)
%U Week of year as decimal number; Sunday is first day of week (00-53)
%w Weekday as a decimal number (06; Sunday is 0)
%W Week of year as decimal number; Monday is first day of week (00-53)
%x Date representation for current locale
%X Time representation for current locale
%y Year without the century as a decimal number (00-99)
%Y Year with the century as a decimal number
%z is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them.
%Z Timezone name or abbreviation; no characters if timezone is unknown Assigned to Joel Reitz by Carl Ellis
%% Percent sign

Return Values

The number of characters placed in string if the total number of resulting characters, including the terminating null, is not more than maxsize.
Success.
0 (zero) and the contents of the string are indeterminate if the result is larger than maxsize.
Failure.

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_tcsftime strftime wcsftime

Requirements

Versions Defined in Include Link to
INtime 3.0
INtime 6.0 (wide-character and generic text versions)
intime/rt/include/time.h
intime/rt/include/wchar.h
intime/rt/include/tchar.h
time.h
wchar.h
tchar.h
clib.lib
   
See Also