date_time converting from date to number of days
24 Dec
2003
24 Dec
'03
8:46 a.m.
I want to find the number of days in-between two days. What is the easiest way to do this? I am using the date_time lib and want to find the number of days from the time_t started. ptime timet_start(date(1970,1,1)); ptime t(d); time_duration diff = t - timet_start; ptime t123(diff); // timeval tv; //drop off the fractional seconds... // tv.tv_sec = diff.ticks()/time_duration::rep_type::res_adjust(); return 0; // return difference.days; Lars Schouw --------------------------------- Do you Yahoo!? Yahoo! Photos - Get your photo on the big screen in Times Square
7643
Age (days ago)
7643
Last active (days ago)
0 comments
1 participants
participants (1)
-
Lars Schouw