How to change from WORD to CString
-
Hi, In my code, i read the system date with the following code, SYSTEMTIME systime; GetLocalTime ( &systime ); WORD day = systime.wDay; WORD month = systime.wMonth; WORD year = systime.wYear; now, I would like to store it in this format, day/month/year as CString,. how can I do that? Ehsan Behboudi
-
Hi, In my code, i read the system date with the following code, SYSTEMTIME systime; GetLocalTime ( &systime ); WORD day = systime.wDay; WORD month = systime.wMonth; WORD year = systime.wYear; now, I would like to store it in this format, day/month/year as CString,. how can I do that? Ehsan Behboudi
CString strDate; strData.Format(...); // works like printf INTP
-
Hi, In my code, i read the system date with the following code, SYSTEMTIME systime; GetLocalTime ( &systime ); WORD day = systime.wDay; WORD month = systime.wMonth; WORD year = systime.wYear; now, I would like to store it in this format, day/month/year as CString,. how can I do that? Ehsan Behboudi
WORD day = systime.wDay;
WORD month = systime.wMonth;
WORD year = systime.wYear;CString strDate;
strDate.Format("%u/%u/%u", year, month, day);
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
Hi, In my code, i read the system date with the following code, SYSTEMTIME systime; GetLocalTime ( &systime ); WORD day = systime.wDay; WORD month = systime.wMonth; WORD year = systime.wYear; now, I would like to store it in this format, day/month/year as CString,. how can I do that? Ehsan Behboudi
In the MFC try
CTime::Format
orstrftime
for Win32
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
-
Hi, In my code, i read the system date with the following code, SYSTEMTIME systime; GetLocalTime ( &systime ); WORD day = systime.wDay; WORD month = systime.wMonth; WORD year = systime.wYear; now, I would like to store it in this format, day/month/year as CString,. how can I do that? Ehsan Behboudi
I agree with the previous poster. If you are using MFC either use CTime or COleDateTime and they both have a function to convert the time to a string in whatever format you need. John