Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

AX 2012 - Don't show seconds in time

$
0
0

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?


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>