Close

Relief for ODA Team in Ukraine

Learn more
ODA Kernel SDK
OdTimeStamp::strftime Method
Syntax
C++
void strftime(const OdString& format, OdString & timeString) const;

Returns this TimeStamp object as a user-formatted string. 

 

Parameters
Description
format
[in] Format string.
timeString
[out] Receives the formatted time string.

The formatting codes for the format string are as follows; the # suppresses leading zeros: 

 

Code
Description
%a
Short weekday
%A
Full weekday
%b
Short month
%B
Full month
%c
Short date and time for current locale
%#c
Long date and time for current locale
%d
Day of month (01 - 31)
%#d
Day of month (1 - 31)
%H
Hour in 24 hour format (00 - 23)
%#H
Hour in 24 hour format (0 - 23)
%I
Hour in 12 hour format (01 - 12)
%#I
Hour in 12 hour format (1 - 12)
%j
Day of year (001 - 366)
%#j
Day of year (1 - 366)
%m
Month (01 - 12)
%#m
Month (1 - 12)
%M
Minute (00 - 59)
%#M
Minute (0 - 59)
%p
AM/PM indicator for current local
%S
Second (00 - 59)
%#S
Second (0 - 59)
%U
Week of the year, first day of week is Sunday (00 - 53)
%#U
Week of the year, first day of week is Sunday (0 - 53)
%w
Weekday, Sunday is 0, (0 - 6)
%#w
Weekday, Sunday is 0, (0 - 6)
%W
Week of the year, first day of week is Monday (00 - 53)
%#W
Week of the year, first day of week is Monday (0 - 53)
%x
Date for the current locale
%X
Time for the current locale
%y
Year without century (00 - 99)
%#y
Year without century (0 - 99)
%Y
Year with century
%Y
Year with century, no leading zeros
%z
Time-zone name
%Z
Time zone abbreviation
Copyright © 2002-2022. Open Design Alliance All rights reserved.