Click here to Skip to main content
15,917,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have the unix time follwing
string str=1230728833;
I want to convert str to the date time format of string..
Please help....
Posted
Updated 23-Sep-11 18:03pm
v2
Comments
CPallini 27-Sep-11 8:06am    
That's not a valid C++ statement: Do you mean
string str="1230728833";
or
time_t t = 1230728833;
?

Unix/Linux timestamps are the number of seconds since midnight, January 1, 1970 GMT (referred to as the Epoch). They are much easier to programmatically manipulate than date/time strings.

Look at the source code given here : time_t on wiki
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900