EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-03-12 09:42 AM
Hi all,
I would like to delete certain historical values inside Geo SCADA with a script, using the .NET API.
It seems to me that the problem is that it does not see the milliseconds of the RecordTime.
I created a calculated variable, every minute increases the value by 10, I also ran it manually to ensure that the timestamp has milliseconds other than 000:
If I run the following lines of code it only works where the timestamp has milliseconds 000:
Dim PointObj = connection.GetObject("New Analog Point")
Dim startTime As DateTime = DateTime.Parse("2025-03-11 17:48:00.000")
PointObj.Aggregates("Historic").InvokeMethod("DeleteValue", {startTime, 3, ""})
Is there something I'm doing wrong?
Thanks!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-03-13 02:54 AM
I suspect you need to use DateTime.ParseExact() rather than DateTime.Parse() to parse a string that contains milliseconds, something like:
DateTime.ParseExact("2025-03-11 17:48:00.000", "yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture);
https://learn.microsoft.com/en-us/dotnet/api/system.datetime.parseexact?view=netframework-4.8
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-03-13 07:39 PM
I thought the DateTime data type didn't support milliseconds? Maybe that was just under VBA and VBScript.
I always used DateTimeOffset as the data type to use for these.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-03-18 02:24 AM
I tried this but it still doesn't work
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-03-27 02:30 AM
Even milliseconds might not be enough. I think you may need to read the actual time from an API call to get raw history and use that to delete the record.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.
With achievable small steps, users progress and continually feel satisfaction in task accomplishment.
Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.
of