Write to tag and set timestamp?

I'm not sure what you mean? Technically, if you logged the last data all the time, you're just logging over time as per normal :slight_smile:

When reading data from API and writing to the database using storeTaghistory and at the end writing the value to tag
As tag have the historian enabled so again a new value is stored in the database with current time.

We cannot disabled the history as we are writing to that tag and storing in the database, only concern is when writing the last value to tag it save into the database

Ah, well that was why I set the historic deadband to 999999999 so that writing a value to the tag wouldn't also record a value in the history. It only ever inserted history using the store history function. It feels a bit hacky, but it works

I have the tag that need to be write also from Ignition to the API, so when I write the tag It should save in the database,
making deadband high will stop pushing the data when I am writing it directly and expecting it to save in database

Have you tried writing api history up until the latest - 1, then using tag write including the timestamp to write the last value? With the history db set normally

Actually, thus is what I tried but I couldn't get it working as I needed...

I'm not sure what the best solution is to your problem... It's a bug in my opinion

Writing a BasicQualifiedValue via writeBlocking should always write the timestamp in there, but it doesnt

I had tried couple of steps like disabled the history before writing to the tag and enable after writing is complete. but no luck

I put deadband high before writing and set to 0 after that, last change value on the tag is saved somewhere and as configuration matches it push it to database

BasicQualifiedValue is writing with timestamp but history is saved with current time.
(or I am missing some configuration)