
Sean Farrow schrieb:
Which header is this declared in? Sean.
time_duration is declared in boost/date_time/time_duration.hpp, but you probably want to include boost/date_time/posix_time/posix_time.hpp or boost/date_time/posix_time/posix_time_types.hpp (if you don't need I/O functionality). See also: http://www.boost.org/doc/libs/1_35_0/doc/html/date_time/posix_time.html#date... Regards James
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Jean-Pierre Bergamin Sent: 09 June 2008 13:10 To: boost-users@lists.boost.org Subject: [BULK] Re: [Boost-users] Converting seconds to minutes and seconds using boost::datetime Importance: Low
Sean Farrow schrieb:
Does boost::datetime allow me to convert seconds (such as 164) to minutes and seconds? If yes wha function does this. Sean.
Construct a time_duration to get the information, i.e.:
boost::posix_time::time_duration dur = boost::posix_time::seconds(164); long h = dur.hours(); long m = dur.minutes(); long s = dur.seconds();
Regards
James