I'd like the date to be something like "2023-07-21T02:00:00Z"
in the dataset.
At first I thought it needed to be converted like this but that caused errors like it already was.
import datetime
your_timestamp = 1690912200000
print your_timestamp
date = datetime.datetime.fromtimestamp(your_timestamp / 1e3)
print date
When I look at the value of timestamp_numeric before and after the tagDataset.append
I get this 2023-08-01 12:59:00.000
.
for row in range(historicalValues.getRowCount()):
# Get data from each row in historicalValues
timestamp_numeric = historicalValues.getValueAt(row, 0) # Assuming the timestamp is in the first column
system.perspective.print(timestamp_numeric)
value = historicalValues.getValueAt(row, 1) # Assuming the value is in the second column
# Append data to tagDataset
tagDataset.append([system_ParentFolder, sector_ParentFolder, unit_ParentFolder, browseTag.name, value, timestamp_numeric])
system.perspective.print(timestamp_numeric)
When I look at the resulting dataset it's an integer. Is that all the dataset supports?
"timestamp":1690912200000