Solved

System time

Posted on 1999-01-15
2
169 Views
Last Modified: 2013-11-20
Does anyone know how to display the system time\date\mins\etc  in a CString?

I know you have to use GetSystemTime,  but does anyone have an example I could use.  thanx
0
Comment
Question by:needhlp
2 Comments
 
LVL 12

Accepted Solution

by:
migel earned 50 total points
ID: 1327770
Try to use this code
   CTime timeWrite;   timeWrite = CTime::GetCurrentTime();
   // write the time out
   CString str = timeWrite.Format("%d %b %y %H:%M:%S");
//  look help for the CTime::Format to understand format symbols
0
 

Author Comment

by:needhlp
ID: 1327771
Whoa, thanx!  : )

how do you get the months to display as numbers?

thanx again
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
if loop error 4 77
iSeries FTP Exit Program 8 114
Add content to output file 4 58
conditional code and condition difference 9 65
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now