The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #10: Date Time Calculations

etechman
Astéroïde

For some reason this one really threw me for a loop.  Nonetheless I still got a solution finally.

LukasJennings
Astéroïde
Révélation
Days = DateTimeDiff([Time_Now],[TIMESTAMP],'days') Hours = DateTimeDiff([Time_Now],[TIMESTAMP],'hours')-([Days]*24)  Minutes = DateTimeDiff([Time_Now],[TIMESTAMP],'minutes') -                 (DateTimeDiff([Time_Now],[TIMESTAMP],'hours')*60) Seconds = DateTimeDiff([Time_Now],[TIMESTAMP],'seconds') -                  (DateTimeDiff([Time_Now],[TIMESTAMP],'minutes')*60)Days = DateTimeDiff([Time_Now],[TIMESTAMP],'days') Hours = DateTimeDiff([Time_Now],[TIMESTAMP],'hours')-([Days]*24) Minutes = DateTimeDiff([Time_Now],[TIMESTAMP],'minutes') - (DateTimeDiff([Time_Now],[TIMESTAMP],'hours')*60) Seconds = DateTimeDiff([Time_Now],[TIMESTAMP],'seconds') - (DateTimeDiff([Time_Now],[TIMESTAMP],'minutes')*60)

 

Days = DateTimeDiff([Time_Now],[TIMESTAMP],'days')
Hours = DateTimeDiff([Time_Now],[TIMESTAMP],'hours')-([Days]*24)
Minutes = DateTimeDiff([Time_Now],[TIMESTAMP],'minutes') -
(DateTimeDiff([Time_Now],[TIMESTAMP],'hours')*60)
Seconds = DateTimeDiff([Time_Now],[TIMESTAMP],'seconds') -
(DateTimeDiff([Time_Now],[TIMESTAMP],'minutes')*60)

Sashikumar
Astéroïde

Nice.

Révélation
ch10.PNGch10_1.PNG
Blair_A
Météore

Here's my solution for this challenge. I did update the task input data to be the same as the output data.

Révélation
Challenge 10.jpg
navneetmohit
Météoroïde

This is the shortest method I could think of. Will appreciate if someone could comment on this to tell me if I was right or wrong.

greggrimmer1
Astéroïde
Révélation
greggrimmer_0-1603293711093.png

 

A2H
Bolide
Révélation
Capture d’écran, le 2020-10-22 à 15.13.38.png
WernerE
Astéroïde

Nice one, Thanks

Révélation
Screenshot_1.jpg

 

michael_leoni
Astéroïde
Révélation
Please see my solution below. 
MikeLR
Comète

I went for separate formula tools for each step

Révélation
MikeLR_0-1604936598992.png