Forum Discussion
Hours:Minutes
I have a table with Employee Code, Punch In and Punch Out values. The Data Type is Date/Time. I am trying to calculate hours:minutes for each employee and then sum all hours:minutes. I used this DAX statement
TODAY_HOURS = DATEDIFF('tick'[drvt.punch_in_time_1], 'tick'[drvt.punch_out_time_1],HOUR)
It looks wrong. Please help
Hi sureshsonti,
Seems these two columns don't have proper data type. Please check and change them into time.
Best Regards,
Dale
4 Replies
- ChrisMendoza
Resident Rockstar
I believe the DATEDIFF ( ) requires the datetime value not just the time value. Try it with a datetime field.
- v-jiascu-msft
Microsoft Employee
Hi sureshsonti,
Seems these two columns don't have proper data type. Please check and change them into time.
Best Regards,
Dale
- v-jiascu-msft
Microsoft Employee
- sureshsonti
Helper II
Dale,
Your solution solved my issue. Thanks for your help.