Login Page - Create Account

Support Board


Date/Time: Mon, 20 Jan 2025 08:27:40 +0000



Post From: how to set time range passing over midnight

[2018-05-27 10:27:58]
User30743 - Posts: 365
hi, i have some issues trying to set time range that would pass over midnight.

lets say i want to calculate mid-price of premarket (starting 15:30 and ending 8:30 the next day). when i set up the starting time at 15:30 and finishing time at 8:30 in my inputs using SetTime/GetTime function, it doesn't really work well.

it either calculates from 15:30 till midnight, or it starts calculating from midnight and stops at 8:30. in both cases the result is incorrect because i need to calculate from 15:30 up to 8:30 next day in one go.

i know the GetTime function returns int of seconds from midnight so the behaviour kind of makes sense. but i dont know how to set up the range correctly. which function to use or how to combine them.. i tried some others (eg. COMBINE_DATE_TIME etc.) but did not succeed.

can you give me a litle hint of how to solve it?
Date Time Of Last Edit: 2018-05-27 10:28:35