using AM and PM with boost::posix_time newbie
23 Sep
2011
23 Sep
'11
4:55 p.m.
the following code works properly std::string ts("2002-01-20 10:27:30"); boost::posix_time::ptime t(boost::posix_time::time_from_string(ts)); std::cout << t.time_of_day() << "\n"; 1) Now i want to actually change the string to std::string ts("2002-01-20 10:27:30 AM"); but that wont work ?? Why any suggestions would be appreciated?? 2) also to display time i am using boost::posix_time::ptime pc(boost::posix_time::second_clock::local_time()); std::cout << pc.time_of_day() << "\n"; //output is 10:55:30 how could i make it display am/pm in the output ??
4801
Age (days ago)
4801
Last active (days ago)
0 comments
1 participants
participants (1)
-
Adam Zedan