0

Input - date in string - "2021-12-25T11:15:00Z"

output required: 2021-12-13 15:00 PM which is basically yyyy-MM-dd HH:mm aa format

what I tried:

 new Date('2021-12-25T11:15:00Z').toLocaleString()

which outputs - '12/25/2021, 3:15:00 PM'

is there any way, I could achieve this using toLocaleString options?

maaz
  • 3,190
  • 18
  • 55
  • 95
  • [toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString) – mplungjan Dec 14 '21 at 09:47
  • 1
    Not sure if there are any timezones that are 3 hours 45 minutes from UTC! – phuzi Dec 14 '21 at 09:47

0 Answers0