I'm using the system.tag.storeTagHistory example at the bottom of the page. I can get it to work when I let it insert the current time. I want to insert a time value I'm reading from a CSV file.
[code]import datetime
histProv = "hp_Energy"
tagProv = "tp_Energy"
paths = ["EnergyMeters/Board A/MA-44-Test/_kWh"]
values = [ 15]
q = 192
The following line inserts the value with current time. It works.
system.tag.storeTagHistory(histProv, tagProv, paths, values)
#If we try to specify the time (as below) we get an error ...
date = system.date.getDate(2017, 2, 15)
histDate = system.date.setTime(date, 15, 04, 44)
system.tag.storeTagHistory(histProv, tagProv, paths, values, q, histDate)[/code]
Error message is:
What am I doing wrong?