I am reading datetime from a database in format ColeDateTime. I want to convert it to CTimeto get the month date year and time.
CString repDt;
COleDateTime dt;
dt.ParseDateTime(repDt); **
CTime t(dt.GetYear(), dt.GetMonth(), dt.GetDay(), dt.GetHour(),
dt.GetMinute(), dt.GetSecond());
m_time=t.GetTime();
Please give me some solution, how can I do this?
Thanks in advance.
source
share