Is there a way to subtract two static dates in sav...
# general
l
Is there a way to subtract two static dates in saved search and get the number of days? Ideally, inclusive but I can probably add x number of days, as needed. For example, I want to count the number of days between 01/01/2021 to 08/31/2021. I tried using TO_CHAR but I wasn't successful.
r
You can directly use Formula: number ROUND ({firstdate}-{seconddate}) This will give you no.of day's
l
These are static dates. They're not stored in a field but will be hardcoded in the formula.
g
To_Date('08/31/2021','MM/DD/YYYY') -To_Date('01/01/2021','MM/DD/YYYY')
If they are static dates though, might as well just input the result (242) into a formula
l
Thank you! I have the same format except that I use TO_CHAR haha We would change these "static" dates from time to time. The reason for this is that we couldn't find a way to calculate that difference based on the Available Filter From and To dates (hoping that user wouldn't need to go and edit the saved search).