If you tag use exception and compression, duplicate values should not go to archives.
Please check tag attributes. Compressiong = on and excmax and compmax are set. (ExcDev and comdev does not work. The string should be exactly the same)
However, you can see 2 events at the last timestamp. ("test3" value) because of snapshot and archived value.
I put a lot of the same values for this test but results were following.
Also if there are annotations, these events are not compressed.
If you don't want to update timestamp for duplicate value events, then you can use following way.
At first, check snapshot value
If the new value comes, check the snapshot contains the same value
If the new value is different value from snapshot value, then use updatevalue
You can configure the datetime control to be able to select the seconds as well. I have not been able to get it to display milliseconds since the control doesn't support it. This way, you will be able to control the seconds and the AFUpdateOption Enum 'NoReplace' can help to prevent duplicates.
timePicker = new DateTimePicker(); timePicker.Format = DateTimePickerFormat.Custom; timePicker.CustomFormat = "dd-MMM-yy hh:mm:ss"; timePicker.ShowUpDown = true;
If you want to remove milliseconds before doing UpdateValue, you can do this if you have a DateTime
or this if you have an AFTime
Sorry for the late response, you had great suggestions but even if I hardcode the custom format into the control and/or use .AddMilliseconds(-dateTime.millisecond) it still is the same result. I will try AFTime next but it may not be for a while I will live with the milliseconds for now.