Boost logo

Boost Users :

From: Jean-Pierre Bergamin (james_at_[hidden])
Date: 2008-06-09 08:09:34


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net