PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 2/28/2023 2:05 PM by  John Henley
Datetime Conversion
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Bill Brennenstuhl
Business Systems Analyst
Private
Basic Member
(15 points)
Basic Member
Posts:7


Send Message:

--
2/13/2023 7:42 PM

    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
    Private
    Private
    Senior Member
    (9932 points)
    Senior Member
    Posts:3328


    Send Message:

    --
    2/28/2023 2:05 PM
    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
    You are not authorized to post a reply.