Support Board
Date/Time: Sun, 23 Feb 2025 09:55:29 +0000
DATETIME_TO_YMDHMS_MS error after update 2226
View Count: 492
[2021-02-09 07:25:23] |
User210074 - Posts: 63 |
Hello When updating the SierraChart platform to version 2133, I had to replace function SCTimeAndSalesArray by c_SCTimeAndSalesArray .Everything works perfectly. I did the last SierraChart update 2226. Now in my code I have a 'error C2664: "void DATETIME_TO_YMDHMS_MS(int64_t,int &,int &,int &,int &,int &,int &,int &,const bool)': cannot convert argument 1 from 'SCDateTime' to 'int64_t'" I can no longer find the function 'DATETIME_TO_YMDHMS_MS' in the documentation. It no longer exists ? If so, what other function did you replace it with ? int Year{},Month{},Day{},Hour{},Minute{},Second{},MilliSecond{}; SCString SCSFormatDT{"%i%02i%02i%02i%02i%02i%03i"},SCSDateTime{}; c_SCTimeAndSalesArray TS; sc.GetTimeAndSales(TS); /*...*/ SCDateTime DT = TS[Ia].DateTime; DT += sc.TimeScaleAdjustment; DATETIME_TO_YMDHMS_MS(DT,Year,Month,Day,Hour,Minute,Second,MilliSecond); SCSDateTime.Format(SCSFormatDT,Year,Month,Day,Hour,Minute,Second,MilliSecond); sc.AddMessageToLog(SCSDateTime,1); |
[2021-02-09 18:05:53] |
|
Change this code as follows: SCDateTime TimeSalesDateTime = TS[Ia].DateTime; TimeSalesDateTime += sc.TimeScaleAdjustment; int Year{}, Month{}, Day{}, Hour{}, Minute{}, Second{}, MilliSecond{}; TimeSalesDateTime.GetDateTimeYMDHMS_MS(Year, Month, Day, Hour, Minute, Second, MilliSecond); 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: