Condition “Current date/time > Variable date” work in 2021 but in 2022 does not work. What should I do?
I’m not sure I understand?
Of course the current date/time is not after 2022…
Can you clarify what you’re asking? Or what exactly the issue is?
Data dostawy > Current date/time +(days): 6
If dostawy is in 2022 it should be visible as any date in 2022 is greater then today + 6 days.
Am I missing something?
Script on screenshot is hiding order when " Data dostawy > Current date/time +(days): 6"
And It’s working like that… IMAGE
Why orders in 2022 are unhided?
This doesn’t look right to me - the 2 expressions on the filtered fields, are these text or date data types? As it looks like you are formatting as a defined date display, which therefore renders as text not a date to compare results.
These 2 expressions are text
In that case, the 2 fields you are filtering on are text as well then - you’ll need to change these fields to data field type ‘date’. This will allow you to apply proper date maths and for you to formulate a valid expression.
If you still need assistance, can you just clarify the filtering type, is it only to show orders from current date + 6 days but not orders from 2022 - is that correct?
I’ve changed data field type to DATE but when I do :filtering there is condition “Current date time= delivery time” Date is the same but… time does not match. How I can exclude time from date?
The ‘current date time’ expression will always evaluate having a time. A date always technically has a time, typically 12am on the local. With that said, you can adjust the time to a custom value using the ‘rounded down’ expression e.g. 12:00am
If you use the exact ‘=’ this will mean that the order will have to have occured within that exact ‘date time stamp’. You’ll want to use the evaulators of > to be greater than a date and then maybe the < to be less than a specific date e.g. current date time + year 1 rounded down to year
After using “:rounded down to day” everything works perfectly! Thanks for help
This topic was automatically closed after 70 days. New replies are no longer allowed.