How to get firestore timestamp

后端 未结 4 2180
孤城傲影
孤城傲影 2021-02-07 19:18

I\'m trying to get the timestamp of a document that I created in firestore, but what I get is this:

myService.ts

getDomiciliari         


        
4条回答
  •  感情败类
    2021-02-07 19:44

    IF you want the date value of firebase.firestore.FieldValue.serverTimestamp() you can use .toDate(). See FireStore Timesteamp. In your case it will be domiciliario.date.toDate() in your template.

提交回复
热议问题