Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 13:37:35 +0000



Post From: ASCIL Creating TimeDeltas

[2023-08-19 14:29:00]
User431178 - Posts: 544
1) sc.BaseDateTimeIn.TimeAt(sc.Index)-ExecutionTime.GetTimeAsSCDateTime()
sc.BaseDateTimeIn.TimeAt returns the time in seconds since midnight, so subtracting an SCDateTime variable from that won't work.

2) sc.BaseDateTimeIn[sc.Index].GetMinute()-ExecutionTime.GetMinute()
Both of these return the minute part of the time, so only make sense if both times are in the same hour of the same day.
Even then the result would be the integer difference (minutes) between the two variables, so not a datetime variable.

There is information about the different functions and concepts here: Working with the SCDateTime Variables and Values

I don't think it is documented, but did you try using the SCDateTimeSpan object?
You can find SCDateTimeSpan in SCDateTime.h if you want to see how to use.

Otherwise, please post the actual code showing what you are trying to do.
Date Time Of Last Edit: 2023-08-19 14:29:11