Forum Discussion
MarionKeller
7 years agoNew Member
DateDiff with Direct Query as Measure
I need to have the Date Difference between two Date columns # of Minutes = Datediff(OP_ORDER_ITEM_ARCHIVE[PICKING_AT];OP_ORDER_ITEM_ARCHIVE[REFILLING_AT];MINUTE) I'm using the DateDiff Func...
luke611
6 years agoFrequent Visitor
I have exactly the same. DirectQuery + Oracle database. Any ideas?
- lbendlin6 years agoSuper User
DATEDIFF is overrated. Try just subtracting one date from the other. Internally dates are treated as numbers with the whole part representing the days and the fraction representing, well fractions of days. Say you want to know the difference between Date A and Date B in hours, you would write ([Date A]-[Date B])*24
- luke6116 years agoFrequent Visitor
lbendlin many thanks for swift reply. Unfortunately there is another error raised when I change DATEDIFF into simple minus between two dates:
ORA-00904: "t0"."DATE_COLUMN": invalid identifier. The exception was raised by the IDbCommand interface.
- lbendlin6 years agoSuper User
As you can see this is an error on the Oracle side. Verify that you got the field name right.