Convert a Julian date value to a string formatted according to that represents date/time
BOOL date_to_str_custom( double rDate, LPCSTR lpcszFormatStr, LPSTR lpszDateStr )
If successful then TRUE else FALSE
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 } } }
str_to_date_custom
origin.h