How to convert date like 1536883200000 in ionic calendar

Hello :slight_smile:
I’m using ionic calendar plugin

I got event of calendar and log it
it has a date like 1536883200000…
how can I convert it?
I can’t find answer …

The number is an unix timestamp:

  1. npm i moment --save
  2. import * as moment from moment
  3. const dateStringThatWorksForIonicDatepicker = moment.unix(1536883200000).format(‘YYYY-MM-DD’)

var date = new Date(1536883200000);
Fri Sep 14 2018 02:00:00 GMT+0200 (hora de verano de Europa central)