hi all......
Can you explain me how to get local timestamp in C++.
regards wijitha.
wijitha
0
Newbie Poster
Recommended Answers
Jump to Postsee the functions in time.h -- such as time(0) will return the current time in seconds since 1970 (or something like that). Then localtime() will convert it to a structure tm. There is also a gmtime() that converts the time(0) to GMT instead of local time.
Jump to PostYou have to format the stamp yourself from the information received from the functions Ancient Dragon suggested you look into.
All 5 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Salem
commented:
Nice succinct answer
+12
wijitha
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Jishnu
160
Posting Pro
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.