Data Point Details "Export CSV" does not show date/time
-
When I export a csv file from Data Point Details, It shows something like
"value","timestamp","annotation"
"0.0","1458648000000",
"0.5","1458651600000",Can the module show date/time instead of timestamp ?
The export csv should look similar to exported files in data points.
Point name, Time, ValueThanks !
-
I should add that it is paid version and not trial. The Mango core is 2.7.10 and the "data point details view" is 1.0.5.
-
This is the behavior of exporting points from the older data point details page. There is a github issue kicking around to enforce more consistency in the CSV exports: https://github.com/infiniteautomation/ma-core-public/issues/518
I would advise using the other data point details page for these exports if possible. If not, a little script can convert the timestamps. Using python:
from datetime import datetime, date import re inFile = open("/path/to/your/export") outFile = open("/path/to/your/output.csv", "w+") def myFormatter(dt) : if isinstance(dt, datetime) or isinstance(dt, date) : return dt.strftime("%m/%d/%y %I:%M:%S %p") else : print "Bad date!" return "Converting error" for line in inFile: g = line.replace("\"","").split(",") if len(g) < 2 or re.search("[0-9]+", g[1]) is None : continue #add back the quotes if you want outFile.write(g[0] + "," + myFormatter(datetime.fromtimestamp( int(g[1])/1000 )) + "," + g[2]) inFile.close() outFile.close()
-
Thank you for your help and response. Our users do not know any programming language. Would it be possible to change in the next release of data point detail module ? Thanks !
-
Like I said, you can get that data that way right now on the other data point details page. But, yes, we will consider it.
-
Because the detail data point module can do delta and other operations for hour, day and so on. If the export csv file can output all data will be very helpful. The old data point cannot do this.
-
Ah, yes. I understand.