Login Page - Create Account

Support Board


Date/Time: Sat, 15 Aug 2026 00:18:09 +0000



Post From: ASCIL Creating TimeDeltas

[2023-08-19 13:25:11]
Gradient - Posts: 217
Hi,

I'm attempting to create a timedelta using ASCIL.

I've tried:

SCDateTime ExecutionTime=TradeOrder.EntryDateTime;

1)
sc.BaseDateTimeIn.TimeAt(sc.Index)-ExecutionTime.GetTimeAsSCDateTime()

2)
sc.BaseDateTimeIn[sc.Index].GetMinute()-ExecutionTime.GetMinute()

But these yield incorrect datetime objects (i.e. year is 1900). See Attached.

The attachment shows incorrect computations for timedelta using the the datetime objects(img TimeDelta Error2) as well as the GetMinute() called on the datetimes (img TimeDelta Error 1).


Please Advise.

Thanks.
imageTimeDelta Error 1.png / V - Attached On 2023-08-19 13:20:36 UTC - Size: 26.29 KB - 212 views
Attachment Deleted.
imageTimeDelta Error 2.png / V - Attached On 2023-08-19 13:23:41 UTC - Size: 21.04 KB - 188 views