Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 07:40:22 +0000



Post From: sc.BaseDateTimeIn[BarIndex].GetAsDouble() return time only without correct date

[2022-07-15 15:23:31]
User189399 - Posts: 46
I suppose to export the timestamp of the bars and then input to my Python with the code datetime.fromtimestamp() I have verified the timestamp result returned by sc.BaseDateTimeIn[BarIndex].GetAsDouble() with the Timestamp converter below

https://timestamp.online
The timestamp of 2022-07-02 04:00:25 is 1656705625 not the 44744. It seems the return value from GetAsDouble() is not the standard timestamp. Pls advise the formula how the SCDateTime to calculate its numerical time value or suggest any function that can convert the datetime value to the standard timestamp.