Datetime Conversion

 1 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Bill Brennenstuhl
Basic Member Send Private Message
Posts: 16
Basic Member

I am pulling a datetime string from a text file report in the format of "Mon Feb 11 11:20:09 2023".  From this I need to create a separate date string of mm/dd/yyyy and a separate time string of HH:MM:SS 24 hour format.\

The closest I've been able to is using:

toLocaleDateString = February 11, 2023 toLocaleTimeString = 11:20:09 AM CST

John Henley
Send Private Message
Posts: 3353
You will need to use JavaScript substring syntax to parse out the pieces and reassemble them into the desired format.
Thanks for using the LawsonGuru.com forums!
John