Greetings,
How can we convert TIME into HH:MM:SS format. I mean if the Time is 5:45:23 AM then it should come as 05:45:23 and if the TIME is 5:45:23 PM then it should come as 17:45:23. Using DELCHAR i am able to delete AM and PM from TIME but how to add extra 0 if any of the hour/min/seconds are in Single Digit. We can have DATE2DMY to get Year, Month and Day from the Date. But, How can we do this for the TIME.
0
Comments
I read that you were able to remove the AM/PM part so you can do a evaluate with the other part link this:
EVALUATE(Time2, '5:45:23');
Then you can use the following format command:
FORMAT(Time2, 0, '<Hours24,2><Filler Character,0>:<Minutes,2>:<Seconds,2>');
Object Manager
Go to C/AL Symbol Menuy -> System -> Variables -> Format -> press then F1 and read there also the HELP behind the Hyperlink (FORMAT property).
There u will find examples like this:
And don't forgett (and don't missunderstood me)
.
1. Use the brain ;-)
2. use the help (step 1 must also be run :-) ) <- it's very powerfull
3. search the forum <- if you doesn't found anything in the help
4. create a question, if 1,2 and 3 doesn't bring you to your goal ;-)
Regards
Ex. :- EVALUATE(RealDate,'19022018'); // For Any Date which you want to convert (19-Feb-2018)
EVALUATE(RealTime,'142930'); // For Any Date which you want to convert (14:29:30)