Display Date (not time) from Firestore Timestamp

前端 未结 4 1740
失恋的感觉
失恋的感觉 2021-01-16 14:56

I\'m pulling a timestamp from a Firestore database, and I only want to display the date to the user. The original timestamp is

Timestamp(seconds=1555477200,         


        
4条回答
  •  长情又很酷
    2021-01-16 15:09

    Simply use moment.js and use your required format

    date = moment();
    console.log(date.format("MMMM D, YYYY"));

提交回复
热议问题