Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > time math

Reply
Thread Tools

time math

 
 
Gary Wessle
Guest
Posts: n/a
 
      01-31-2007

#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:osix_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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2) VK Javascript 15 05-02-2010 03:43 PM
Math.min and Math.max for byte / short Philipp Java 9 07-23-2008 12:37 AM
math.h trig functions questions (and some forgotten high school math) Mark Healey C Programming 7 05-22-2006 10:42 AM
Re: Is still math.h the C++ math library ? AciD_X C++ 4 04-01-2004 07:29 PM
Why can I not use: Math a=new Math(); chirs Java 18 03-02-2004 06:00 PM



Advertisments