Alteryx Designer Desktop Discussions

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

Translate Month, Days, Hours, Minutes into real dates

brandonavants
6 - Meteoroid

I have an application that is giving me a 1 month, 4 days, 18 hours, 27 minutes, 7 seconds from when I run a report but I am unable to turn this into an actual date.  The hours from date run are the most difficult as all the others I'm able to parse out the days with regex.  

 

Has anyone else had this as an issue and have a solution?

6 REPLIES 6
SPetrie
12 - Quasar

Can you give some more examples of the values you are getting? Having a wider range of examples to look at will help.

martinding
13 - Pulsar

Hi @brandonavants

 

This reminds me of a weekly challenge: 

Challenge #10: Date Time Calculations https://community.alteryx.com/t5/Weekly-Challenge/Challenge-10-Date-Time-Calculations/td-p/36737

 

If this weekly challenge doesn't help, could you give a bit more information on the issue you are having?

brandonavants
6 - Meteoroid

Martinding,

 

Well, that is the backwards of what I need.  I am literally given  1 month, 4 days, 18 hours, 27 minutes, 7 seconds and I need to turn that into 3/05/2023 ( think that is right)

martinding
13 - Pulsar

Hi @brandonavants,

 

Please see attached:

martinding_0-1681162449652.png

 

brandonavants
6 - Meteoroid

This is it!  I need to subtract though, not add.  

martinding
13 - Pulsar

I see!

 

In that case, it is easier to use a Multi-Field formula to turn all the date/time fields into negative before applying the formula tool.

* You could also just give each field a "-" sign in the formula tool itself (within the DateTimeAdd, but it is more manual and prone to errors).

martinding_0-1681166987061.png

 

Labels