Forum Discussion
Strange / Wrong DateDiff results
Dear Reader,
I/m facing some difficulties with Datediff. Please see below. This is part of querri where I'm substracting two dates. So here the result should be something like 11.xx minutes. For most data the result is ok, but when the day changes i get wrong answers. See 2d picture. What is get is 'day (24*60)-11 minutes, = -1429 minutes
Im stuck, how can i solve this?
reg martijn
hi, martijnth
It seems that [time produced] is a date-time column then you just change the format of it.
So you need to use this way as below:
Use TIME Function to add a new time column as below:
Time1 = TIME(HOUR(Table1[time produced]),MINUTE(Table1[time produced]),SECOND(Table1[time produced]))
Result:
Best Regards,
Lin
2 Replies
- v-lili6-msftCommunity Support
hi, martijnth
It seems that [time produced] is a date-time column then you just change the format of it.
So you need to use this way as below:
Use TIME Function to add a new time column as below:
Time1 = TIME(HOUR(Table1[time produced]),MINUTE(Table1[time produced]),SECOND(Table1[time produced]))
Result:
Best Regards,
Lin
- martijnthHelper II
thanks, solved