Alteryx Designer Desktop Discussions

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

Date time Aproximation

eamritraz
5 - Atom

Hi Everyone !

I am looking for ways to approximate my  minutes value of  date time  to next multiple of 5.

for example 2017-09-01 02:26:00 to 2017-09-01 02:30:00, 2017-09-01 02:44:00 to 2017-09-01 02:45:00.

 

 

 

4 REPLIES 4
JoshKushner
12 - Quasar

Try using this flow. Parse out the date with Regex, round the minute to the next multiple of 5, then reconstruct the date.

 

Flow:

Flow.PNG 

 

Input:

input.PNG

 

Results:

results.PNG

 

 

Regex:

regex.PNG

 

Formula:

formula.PNG

JoshKushner
12 - Quasar

Actually, please ignore that. it won't round up the hour,day, month, or year. Reworking a way by converting to seconds, adding 5 minutes, then rounding down the minutes.

JoshKushner
12 - Quasar

This solution should work. It converts the date to seconds, adds 5 minutes, reconstructs date, then rounds down the minutes the 5 multiple.

 

I've attached a sample workflow.

 

Flow:

Flow.PNG

 

Input:

input.PNG

 

Results:

results.PNG

 

Formulas:

formula 2.PNG

formula.PNG

 

Regex:
regex.PNG

eamritraz
5 - Atom

Thanks Josh!

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels