【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.8.5 date_to_str_custom
Contents
Description
Convert a Julian date value to a string formatted according to that represents date/time
Syntax
BOOL date_to_str_custom( double rDate, LPCSTR lpcszFormatStr, LPSTR lpszDateStr )
Parameters
- rDate
- Julian date value
- lpcszFormatStr
- [input] pointer to a format picture string that is used to form the date string
- lpszDateStr
- [output] pointer to the target buffer
Return
If successful then TRUE else FALSE
Examples
EX1
void date_to_str_custom_ex1() { string strDateIn = "2003-03-21"; string strFormat = "yyyy'-'MM'-'dd"; char szDateOut[MAXLINE]; double db; if( str_to_date_custom(strDateIn, strFormat, &db) ) { if( date_to_str_custom(db, strFormat, szDateOut) ) { if( !strDateIn.CompareNoCase(szDateOut) ) printf("success\n"); // date_to_str_custom gets what str_to_date_custom puts else printf("failure\n"); // date_to_str_custom did not get what str_to_date_custom put } } }
Remark
See Also
Header to Include
origin.h