Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Counting days between dates

vanjak
5 - Atom

Hi,

 

I have a table with a period begin date and end date 

Period startPeriod end
01.01.202117.01.2021
15.08.202025.07.2021
01.12.202114.12.2021

 

I need a way to measure how many of those days are in between two fixed dates.

For example how many days are between 01.01.2021 and 10.01.2021

The answer in this case, by rows, would be 10, 10, 0.

The period-end/start can have multiple years in between and the same goes for the fixed dates.

2 REPLIES 2
cmcclellan
13 - Pulsar

Use the DateTimeDiff function - it takes 3 arguments, the start date, the end date, and the units you want to count (ie days, months, etc,)

Qiu
21 - Polaris
21 - Polaris

@vanjak 
Just a sample.

Capture1A.PNG

Labels
Top Solution Authors