|
-
December 2nd, 2008, 02:17 AM
#1
how to get the system as a string
Hi,
I want to get the current system's time as a string for further manipulation.
Can you give me a code for that ?
Thanks
Riyas.B
Growing Developer
-
December 2nd, 2008, 02:44 AM
#2
Re: how to get the system as a string
 Originally Posted by riyrse
Hi,
I want to get the current system's time as a string for further manipulation.
Can you give me a code for that ?
Thanks
Riyas.B
Growing Developer
You can use strftime, wcsftime (or using MFC you can use the CTime class and it's method called FormatGMT which is similar to strftime).
The detailed description you can find in the MSDN.
With regards
Programartist
-
December 2nd, 2008, 03:09 AM
#3
Re: how to get the system as a string
Code:
CTime clTime = CTime::GetCurrentTime ();
CString clTimeString;
clTimeString.Format ("%02d:%02d%02d", clTime.GetHour (), clTime.GetMinute (), clTime.GetSecond ());
-
December 2nd, 2008, 03:17 AM
#4
Re: how to get the system as a string
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|