Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I have a connection to an Oracle database through Direct Query, I need to subtract a date type column from sysdate.
This can be directly from the query to Oracle or through Power BI.
I mean:
(SYSDATE) - (FECHA_FIN)
I share my query:
Can anyone guide me?
Solved! Go to Solution.
Hi DCORTESR,
You could try to use query like below
SELECT TO_DATE('2000-01-02', 'YYYY-MM-DD') - TO_DATE('2000-01-01', 'YYYY-MM-DD') AS DateDiff FROM dual
Or
SELECT DATEDIFF(day,'2016-06-05','2016-08-05') AS DiffDate
in Oracle query
Or you could ry to create column or measure like below in powerbi
DATEDIFF([field1], [field2], day)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi DCORTESR,
You could try to use query like below
SELECT TO_DATE('2000-01-02', 'YYYY-MM-DD') - TO_DATE('2000-01-01', 'YYYY-MM-DD') AS DateDiff FROM dual
Or
SELECT DATEDIFF(day,'2016-06-05','2016-08-05') AS DiffDate
in Oracle query
Or you could ry to create column or measure like below in powerbi
DATEDIFF([field1], [field2], day)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
97 | |
95 | |
68 | |
65 |