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 ??