I have a date and time in String format and want to convert it Datetime and then in String.
I have String format as – (2023-04-06T20:34:53.981+00:00)
and I want output like – (07/04/2023 02:04:53 AM) and (Apr 7, 2023 02:04:53 AM)
So how I can do this?
Please help me.
3
Answers
And I’d suggest you to google these things first and then come to StackOverflow, read the docummentation on intl library.
try the below code .. to formate the date time you have to use intl package
and yes you can find it just by google search
You can use the intl package to format dates and times. Here’s an example code snippet that shows how to convert the given string to a DateTime object and then format it into the desired string formats: