Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Date time diff results in Null

AKHAN
6 - Meteoroid

I am trying to calculate the number of hours as Overtime by comparing 'Regular Time' of 08:00 which I have introduce it within formula and selected data type as V_WString and subtracting it with 'Time Difference' to calculate 'Overtime' but this results into 'NULL' value with out error. Please suggest how to get the appropriate result

 

orange88724_0-1592994681065.png

 

orange88724_1-1592994693544.png

 

3 REPLIES 3
Ben_H
11 - Bolide

Hi @AKHAN,

 

The fields need to be date/time formatted for datetimediff to work.

 

If you format the Regular Hours and Time difference fields the same way you did In_Time and Out_Time it should work.

 

Regards,

 

Ben

grazitti_sapna
17 - Castor

Hi @AKHAN , the fields time difference and regular hours are string first you can convert them into time using date time parse and repeat the steps you used eariler to fetch time difference column. Here is the screenshot and workflow for your reference.

grazitti_sapna_0-1592996529113.png

 

Sapna Gupta
grazitti_sapna
17 - Castor

Hi @AKHAN , just to make it more clear I have implemented some changes I have added a new column named Below 8 hours where time less than regular hours will be mentioned, just to make it easier for you to figure it out. I hope it will help.

Thanks. 

 

grazitti_sapna_0-1592997604256.png

 

Sapna Gupta
Labels