time math

Discussion in 'C++' started by Gary Wessle, Jan 31, 2007.

  1. Gary Wessle

    Gary Wessle Guest

    #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
     
    Gary Wessle, Jan 31, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chirs
    Replies:
    18
    Views:
    800
    Chris Uppal
    Mar 2, 2004
  2. AciD_X
    Replies:
    4
    Views:
    8,182
    Jonathan Turkanis
    Apr 1, 2004
  3. Mark Healey
    Replies:
    7
    Views:
    1,572
    Tim Prince
    May 22, 2006
  4. Philipp
    Replies:
    9
    Views:
    1,176
    Mark Space
    Jul 23, 2008
  5. VK
    Replies:
    15
    Views:
    1,339
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page