Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tying to calculate the sum of days from two date time inputs? #69

Open
DangerDrome opened this issue Mar 16, 2024 · 1 comment
Open

Comments

@DangerDrome
Copy link

Tying to calculate the sum of days from two date time inputs, such as:

{{ DAY(SUBTRACT(end, start)) }}
or
{{ SUBTRACT(DAY(end), DAY(start)) }}

But just getting 0, debug doesn't seem to display anything:

image

Probably user error...

@DangerDrome
Copy link
Author

DangerDrome commented Mar 16, 2024

After some breif debugging, the following don't appear to be working?

YEAR(a) | get year of a date object, similar to getFullYear
MONTH(a) | get month of a date object, similar to getMonth
GET_DATE(a) | get date of a date object, similar to getDate
DAY(a) | get day of a date object, similar to getDay

However this seems to work:

{{ SUBTRACT(GET_DATE(DATE(end)), GET_DATE(DATE(start))) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant