0

Timestamp is "2019-12-30 13:59:00" and I want to convert it to "30/12/2019 1:59 pm" .

I tried several methods :

moment(this.event.start,'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DDThh:mm'); moment(this.event.start,'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DDThh:mm a');

All methods show a correct result but do not show am/pm.

crew
  • 130
  • 1
  • 4
  • 16
  • 1
    Possible duplicate of [How to get am pm from the date time string using moment js](https://stackoverflow.com/questions/44971954/how-to-get-am-pm-from-the-date-time-string-using-moment-js) – crew Aug 07 '18 at 02:48

1 Answers1

0

You tried this?

moment(this.event.start, 'YYYY-MM-DD HH:mm:ss a').format('YYYY-MM-DDThh:mm a'));

crew
  • 130
  • 1
  • 4
  • 16