How to save date in Angular as a timestamp to Firestore?
I am trying to save personal info of person with birth date and activation date into Firestore database in Angular; However, passing object with Date() type fields the dates are saved as a string: this.treatment.activationDate = new Date(); // gives such result in firestore with string type // activationDate: "2018-11-16T09:48:51.137Z" Also tried to use server timestamp, but the following method does not return valid value: firebase.firestore.FieldValue.serverTimestamp() Result in Firestore (not allowed to upload images sorry :) ): activationDate: (map) _methodName: FieldValue.serverTimestamp