UTC datetime(2023-04-28 17:27:19) to 'fff' format('April 28, 2023 at 12:27 PM CDT') and then convert back to original #1501
manjindersinghsarkaria
started this conversation in
General
Replies: 1 comment
-
So you want to parse the string |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a UTC datetime (2023-04-28 17:27:19), which I converted into the 'fff' format, appearing as ('April 28, 2023 at 12:27 PM CDT'). Now, I am looking for a way to convert 'April 28, 2023 at 12:27 PM CDT' back to the original format, '2023-04-28 17:27:19'.
DateTime.fromSQL('2023-04-28 17:27:19', { zone: 'UTC' })
.setZone('local')
.toFormat("fff")
Beta Was this translation helpful? Give feedback.
All reactions