Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |