Forum Discussion
Anonymous
6 years agoNot applicable
Datediff function with decimals
Hi everyone, I am using the function Datediff( ), but the results I am getting are integers, and I need than these ones become decimals. Example: Reuslt: 1215 Expected: 1214.7 Any suggesti...
- 6 years ago
Hi Anonymous
Change date type and format as below:
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ninhtran1301
1 year agoRegular Visitor
The way around it that worked for me is to make the unit seconds in datediff function then divide by 3600 if you want it in hour then it will be more accurate. Depends on the datetime format you're trying to subtract.
For example in my case I want to get the hour difference in Start and stop time below:
calculate(DATEDIFF(min('Scrub Tool'[START_TIME]),max('Scrub Tool'[STOP_TIME]),SECOND),filteredrows)/3600
Btw, this is in DAX.
Btw, this is in DAX.