1

Currently I'm getting an event start time back from an api response and it looks like this in the html template: {{ event.start }} The output of that looks like this: Mon May 10 2021 06:00:00 GMT-0500 (Central Daylight Time)

How can I format this to only show the time that it has with either AM or PM: 6:00 AM ?

albert_anthony6
  • 594
  • 2
  • 9
  • 30
  • 1
    This should get you there: https://stackoverflow.com/questions/19407305/how-to-show-only-hours-and-minutes-from-javascript-date-tolocaletimestring – Kinglish May 15 '21 at 19:05
  • What about the timezone? Shouldn't ``6`` be transformed accordingly? – Majed Badawi May 15 '21 at 19:13

0 Answers0