Timestamp code in Power Chart exported CSV file

In the newest version of the powerchart in perspective, I export the chart to a csv, but the timestamp isn't in a format that I know what to do with in excel, I've tried all the default formats and they don't seem to work.
This is what I get in the time column:
1605200791937

What is this timestamp format?

It’s a modified Unix epoch timestamp, the standard Java internal representation of timestamps. Unix timestamps are defined as seconds since Jan 1 1970; Java timestamps are milliseconds since Jan 1 1970.

Excel doesn’t have a way to convert these with a single formula, apparently, but it’s not too complicated:

You will want to divide the timestamp by 1000 (if you don’t care about losing the millisecond precision) before using the formula in the above link.

1 Like

Awesome, thanks for your help!

Just as a follow-up… As part of the 8.1.2 release, we added config.export.dateFormat and config.export.timeFormat component properties that will give you better control over the format of the timestamp. It can now be a millisecond timestamp or something more human-readable.

4 Likes

Fantastic, luckily I didn’t implement and train for the old workaround yet, thanks for the feature!

I just had a look at this, it seems that the date format does not accept all placeholders as system.date.format allows. In particular, it doesn’t allow yyyy, only YYYY, does this mean it is using the week based year?

Those are separate date format implementations. For the formatting of the date here, you’ll want to check out MomentJS for all of the formatting options available to you if none of the provided options are what you need. You can enter whatever custom format is necessary, and it will be used.

Thanks for that clarification of the time.
In that same CSV, percentage values appear with different numbers. I imagine they have some very small scale that I cannot decipher like this: 10029121651553000.
Which corresponds to a value very close to 1% according to my measurements, what is the parameterization for this case?

Gracias por esa aclaraciĂłn del tiempo.
en ese mismo CSV me aparecen valores de porcentaje con números diferentes, imagino que tienen alguna escala muy pequeña que no logro descifrar así: 10029121651553000.
Que corresponde a un valor muy cercano al 1% segĂşn mis mediciones, cual es la parametrizaciĂłn para este caso?