Solved

Get the Date

Posted on 1997-12-15
3
192 Views
Last Modified: 2010-04-10
How do I get the date? I want the number of the current day storaged in a integer.
0
Comment
Question by:sshulo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:yonat
ID: 1176343
try gmtime() or localtime()
0
 
LVL 7

Accepted Solution

by:
galkin earned 30 total points
ID: 1176344
If you are using Visual C++ you can take advantage of MFC CTime class.

CTime time = CTime::CurrentTime();

Than you can use CTime members GetDay(), GetHour() etc. to get all time parameters
0
 

Author Comment

by:sshulo
ID: 1176345
Thanx..but to create an CTime object the code should look like this:
CTime time = CTime::GetCurrentTime();



0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What is the real difference between C++ and Visual C++.NET? 7 146
c++ syntax question 9 67
Path to  STL Map header file 1 91
Error creating a new C++ project in ,net 20 60
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

751 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