Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Blue Mind

How do you get the date and time in c++

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know, I know... "GOOGLE IT!" "USE MSDN!" MSDN is f***ing useless, it gives me all good answers... but in JScript, Visual Basic, and just about everything else EXCEPT visual c++, despite my filtering the results to only visual c++. As I said before, it''s f***ing useless. So, my question: How do I get the Date and Time, and is there a function that returns this in a character string? cout << "Today is: " << DayofWeek() << ", " << Month() << " " << Day(); Is that too much to ask? It''s a simple question but its hard to find the answer. No, Microsoft, I''m not interested in JScript, despite your insistence. Thanks, Blue Mind
"In so many ways we live to follow the sun" - Bad Religion

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Blue Mind
MSDN is f***ing useless.
No, it isn''t. Most people are just too lazy and careless to learn to use it; it''s interface is different than Google - search is not its strong point, particularly if you don''t have a very specific fully-qualified identifier.

Luckily for you, I do. Time Management Routines. You''ll want to look at time(), localtime() and strftime().

Share this post


Link to post
Share on other sites
The key is to use MSDN *and* Google. That way you get Google''s rankings, and no extraneous results. Try this search on google: "site:msdn.microsoft.com get current time"


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!