Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert firebase timestamp to date js

// to get as date 
const date = new TimeStamp(yourTimeStamp.seconds , yourTimeStamp.nanoseconds).toDate();
// to get as string 
const date = new TimeStamp(yourTimeStamp.seconds , yourTimeStamp.nanoseconds).toDate().toDateString();
 
PREVIOUS NEXT
Tagged: #convert #firebase #timestamp #date #js
ADD COMMENT
Topic
Name
2+4 =