number of days between two dates
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Dear All,
Please help me with the formula for following condition-
how can i get the number of days between these two dates, only taking 2019 period like for
01/01/2019 and 31/12/2021- i need to calculate number of days between 01/01/2019 to 31/12/2019 and for
01/08/2015 and 31/03/2019-i need to calculate number of days between 01/01/2019 to 31/03/2019 and for
01/06/2019 and 31/05/2022 -i need to calculate number of days between 01/06/2019 to 31/12/2019 and for
01/11/2019 and 31/10/22 -i need to calculate number of days between 01/11/2019 to 31/12/2019 and for
01/01/2019 | 31/12/2021 |
01/08/2015 | 31/03/2019 |
01/06/2019 | 31/05/2022 |
01/11/2019 | 31/10/2022 |
Thank you so much in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Ekta
Something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Ekta ,
first step is to convert the dates to the Alteryx Date data type using a DateTimeParse function for both columns (called them "Start" and "End")
DateTimeParse([Start],'%d/%m/%Y')
DateTimeParse([End],'%d/%m/%Y')
The Data Type should be "Date" for both new columns, call them e.g. "StartDate" and "EndDate"
In a second step, you can dcalculate the difference using DateTimeDiff function:
DateTimeDiff([EndDate], [StartDate], 'days').
I've attached a sample workflow. Let me know if it works for you.
Best,
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot for the quick reply, but i am struggling with the year of the dates.i want to keep the period to only 2019 while using the datetime diff 😞
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot for the quick reply, but i am struggling with the year of the dates.i want to keep the period to only 2019 while using the datetime diff 😞
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Ekta , give this a try as well.
If it works then kindly mark this post as solution.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am struggling get the days difference from 2 different dates to work, I am looking for the difference between Quarter Date - Creation Date, can someone take a look at this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
