Firestore DateTime field loading as nanoseconds and seconds

On another note:
When I reload data from firestorm service my date time firestorm field gets imported into your React Studio Sheet filed as nanoseconds and seconds – not as date time
See screen shots

Also there is no atomic element for date time field? what element do you suggest I use to handle date time field as seen in Firestore – see format attached

Firestore data


ReactStudio data sheet after reload


I have found the code fix in

If you can implement downloading code ( – toDate() --) to view and then saving back to nano and seconds firestore format when saving field. (-- fromDate(date) returns firebase.firestore.Timestamp --)

many thanks Steve


Unfortunately we don’t have “Datetime” column type in Data sheets so we can’t detect if the column type is “Datetime”. Youn can always tweak the plugin code to reformat the date for certain columns but I’d still suggest to use Unix time and store it into normal Number or String field. If you need “precision time” (you loose the nanoseconds) then you need to parse the Timestamp column value in Value transformer script.

Converting Unix time into readable format in App is really simple e.g. with Value transformer Script e.g. for Text element:

Example code snippet:

var newDate = new Date(input);
var dateString = newDate.toUTCString();
return dateString

Screen shots of an example app

Thanks Worked

I am using the filename.seconds data sheet value as parsed in available list


Because I’m using seconds (Firestorm Timestamp.seconds) I had to * input by 1000
to get milliseconds - as per your commented out Example line.

without * 1000 the result is


and with * 1000 the result is


Thanks for speedy reply

my code

1 Like