Hi all,
I am using the following code to convert a variable of type TimeOfDay to a string:
time2str(timeComponent, TimeSeparator::Colon, TimeFormat::AMPM));
The problem is that the time is being shown in the following format (as a string):
06:00:00 pm
Now, I want it to be displayed in this manner:
6:00 PM
As you can see, the first 0 in the hour has been removed. The seconds have also been removed and the pm is displayed in capital.
How can I do this please?