Datetime Conversion

 1 Replies
 0 Subscribed to this topic
 51 Subscribed to this forum
Sort:
Author
Messages
Bill Brennenstuhl
Basic Member
Posts: 16
Basic Member
2 New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!

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
Posts: 3362
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
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