In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
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

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
Top Solution Authors