Get ISO-8601 date time format from CTime class (C++/MFC)



Here is how to get ISO-8601 date time format string from CTime MFC class (C++).

 
CString	FormatISO8601DateTime(CTime tm)
{
	//returns time eg: 2012-10-04T16:57:00Z
	return tm.Format(_T("%Y-%m-%dT%H:%M:%SZ"));
}


Leave a Reply

Your email address will not be published. Required fields are marked *