time math

G

Gary Wessle

#include "boost/date_time/local_time/local_time.hpp"
#include <iostream>

int main()
{
using namespace boost::gregorian;
using namespace boost::local_time;
using namespace boost::posix_time;
ptime t1(date(2007,Jan,21), hours(7)+minutes(30));
time_t t2( 1170202896 );
cout << t1 - t2 << endl;
}


dear progrmmers.

I need to set a bool to true if a given time_t is past a time string of a formate say mm/dd/yyyy hh:mm.

I have been playing around but cann't just get it, please help

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top