troubleshooting Question

MFC/Win32: obtaining the system time, converting a LPSYSTEMTIME into a string.

Avatar of sternocera
sternocera asked on
System ProgrammingMicrosoft DevelopmentEditors IDEs
11 Comments2 Solutions3658 ViewsLast Modified:
I understand that I can obtain the system time in this fashion with the win32 api:
            LPSYSTEMTIME systime;
            GetSystemTime(systime);

how can I subsequently get an MFC CString of the system time? I've tried this (it was always going to be  a long shot):

CString time;
time.Format("%s",systime);

This causes an assertion failure and doesn't work. Please advise,
Regards,
Sternocera
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros