I'm fighting a few days with COleDateTime
in MFC.
I have CTime
with correct values. Correct years, days, months, hours, minutes and seconds.
I tried a few ways to convert CTime
to COleDateTime
:
-1.I put CTim
e data to constructor of COleDateTime
COleDateTime(int nYear,int nMonth,int nDay, int nHour, int nMin,int nSec );
-2. I formatted CTime
to time.Format("%m/%d/%y %H:%M:%S");
and passed to ParseDateTime
of COleDateTime
.
-3. Also I tried to use SetDateTime
of COleDateTime
After that I'm getting incorrect values of minutes 1-2 min. more or less. I have never seen it before and I couldn't find nothing in internet.Everybody says abot loss precision but this a second, not a minute. Please advice something for me! Thank you