Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 09:49:39 +0000



Post From: DATETIME_TO_YMDHMS_MS error after update 2226

[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);