Time calculation help needed

Mike_T
New Member

I’m trying to have a slice filter rows in between Now (pacific time) and Now+36 hours. Can someone validate that his expression works based off of Pacific Time Zone?

[Date]>Now(),[Date]<= (Now()+1.5)

Yes, Date is a DateTime type.

0 4 179
4 REPLIES 4

Hi

I think that now()+“1.12:00:00” will add 36 hours.

So perhaps try,

And(
[Date]>now(),
[Date]<=(now()+“1.12:00:00”)
)

I’ve not tested this.

I would try looking within the Appsheet documentation there’s a massive amount of useful info.

I’m not sure days.hours is recognized by AppSheet. I’d suggest just:

now() + "36:00:00"

Mike_T
New Member

Thanks for these replies. I wasn’t having an issue with the adding 1.5 days. I was wanting to validate the time zone. Struggling to get my head around when I can use local time vs UTC? Since it’s a slice, is the server (UTC) applying the filter or is it the device (PST).

And if it’s UTC does that mean I need to use NOW()+ 28 hours? Why do I struggle with time zones so much?

Don’t answer that last one.

Slices are processed where they’re used. If an expression is being evaluated on the device, it’s referencing slices that are processed on the device. If the expression is being evaluated from a workflow or report, it’s referencing slices processed by the server.

When a workflow is performed, it is aware of and should use the timezone of the device that originated the change it’s responding to.

A report is explicitly configured with a timezone:

3X_1_6_1633cf91f537540401848c99f3d5db278821ff53.png

Stored times don’t include timezone information, though the data source itself may attach a timezone to it. If the data source attaches a timezone, I would expect the value to be adjusted accordingly as it moves from the data source to the app and back.

I have no idea whether any of this addresses your concern.

Top Labels in this Space