Going Backwards on start time

Hey,
This is how the start and end times of a Production property is currently calculated, where the 25200 is 7 hours in seconds. the current date is the midnight of the previous day with 7 hours added on for the start date and the end date is 24 hours added on to that. WHich means I am currently recording 24 hours of data for that property.

I wish to accumulate a month worth of data for that property that needs to be displayed on a report everyday. Is there anyway I can minus time as opposed to adding on time? I am happy with the End time of the property but want the start time to move backwards to the current date as opposed to the current forward movement. Gives me an error when i currently do it.

Usually answers will be better if you show your work. What have you tried for StartDate and EndDate, and what error are you getting?

This is how the start time is currently calculated.

When I try to Minus the same number to go backwards of the current date this is error I get.

You should really use the dateArithmetic function.

dateArithmetic({Root Container.Schedule Date Selector.currentDate}, -7, "hour")

Or,

dateArithmetic({Root Container.Schedule Date Selector.currentDate}, -25200, "sec")
3 Likes

Hey Jordan!

IT WORKED!!! This has been sooo helpful! I ve been stuck on it for months!

Cant thank you enough !