Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to format this question into date and time

kajoljoshi
6 - Meteoroid

Students ran a race consisting of two laps around an outdoor cross-country obstacle course. The following dataset shows their start time, the time their first lap was finished, and the time when their second lap was finished. how many students lap faster than the first. Computed calculation in seconds not minutes?

a 13
b 14
c 15
d 16
 
I followed the DateTime parse to convert into datatype format, but it shows null. Any suggestion on how can I differentiate the date/time into two different columns or change the format?
2 REPLIES 2
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@kajoljoshi ,

I hope my workflow may help.

Formulas:

Sec_Start_to_1stLap = DateTimeDiff([Time After First Lap],[Start Time],"seconds")

Sec_1stLap_to_2ndLap = DateTimeDiff([Time After Second Lap],[Time After First Lap],"seconds")

Outcome = 

IF [Sec_Start_to_1stLap] > [Sec_1stLap_to_2ndLap]
THEN "2nd lap is faster"
ELSE "1st lap is faster (or same)"
ENDIF

Workflow:

Yoshiro_Fujimori_2-1678091601217.png

Output:

Yoshiro_Fujimori_1-1678091541733.png

So I would say the answer is "A 13"😀

kajoljoshi
6 - Meteoroid

Hi thank you for providing the workflow, I have attached my work but output doesn't come same as your. Can you please see what is missing?

Labels
Top Solution Authors