We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Can I perform math functions on a date data type?

c-yun
6 - Meteoroid

Hello,

 

I want to perform the following Excel function in Alteryx: =INT((B2-1)/7)*7+1.

How can I convert this formula into Alteryx syntax so I can use it in the formula tool?

Can I get a result using a different tool too?

 

 

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@c-yun 
I think you are trying to get the date of Sunday (as beginning of the week) for the dates list.

0421-c-yun.png

c-yun
6 - Meteoroid

How can I add an IF statement to your formula that will give me the original start date if the original start date is already a Sunday?

When I enter the formula as it is currently, it gives me the previous Sunday date.

Pilsner
13 - Pulsar

Hello @c-yun 

One way to tackle this would be to add a data time parse tool in, before the formula, to extract the day.

After this, you can edit the formula with an If statement, such that if the day = Sunday, then don't change the date, else, do change the date. 

Screenshot 2025-04-21 161925.png


Please let me know how you get on.

Regards - Pilsner


Labels
Top Solution Authors