Login Page - Create Account

Support Board


Date/Time: Tue, 14 May 2024 00:05:38 +0000



SCDateTime.AddYears fails

View Count: 404

[2020-11-04 15:33:17]
jesslinn - Posts: 108
If one happens to add a leap year the month/day will not be the same.

Assuming that one wants one year added to Dec 1, 2003 to be Dec 1, 2004, a workaround is to use GetDateTimeYMDHMS_MS, increment the year, and use SetDateTimeYMDHMS_MS, since then the leap year logic is used.
[2020-11-04 19:34:18]
Sierra Chart Engineering - Posts: 104368
This is true. That function does not have any consideration for Leap years.

We will update the function to support this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-11-04 20:01:26

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account