I want to set server time in Firestore database in Long
format. I have tried to create timestamp using below code, it seems like it creates just reference of the FieldValue
.
val dataMap = HashMap<String, Any>()
dataMap["createdOn"] = FieldValue.serverTimestamp()
Is there any way to create server time and convert it into required format?