Display Nanoseconds as Date/Time

I’m using the Google Fit API and it returns a timestamp in nanoseconds, e.g.
“startTimeNanos”: “1662017849289046550”

I would like to display this value as Date, but I don’t find a smooth way to do so.

Hope you can help me.

That is nanoseconds since 1/1/1970.

Epochtime/Unix time is seconds since 1/1/1970 and Bubble will recognise that.

So divide by 1000000000 and then use the “formated as” date function.

Yes, that’s what I would have expected, but I don’t see an option to format to date:

So eventually I created my own plugin, that does the conversion. I’m just wondering, is this best practice?

image

Maybe?

It is nasty, whatever way you do it.