question

hams avatar image
hams asked

how to get number of days from comparing two date's values?

hello everybody i'm looking for a way to get number of days by comparing two date's values for example : date 1 : 01-JAN-2000 date 2 : 02-FEB-2015 i should get the number of days = 5511 days can anyone please give me an idea to do that in oracle sql+ thank you
sqloracleoracle-sql-developerdatesdata compare
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
aRookieBIdev avatar image
aRookieBIdev answered
use the datediff function to find the difference between two datetime in required unit example:SELECT DATEDIFF(DD,'09/23/2011 15:00:00','08/02/2011 14:00:00') for more : http://www.mssqltips.com/sqlservertip/2508/sql-server-datediff-example/
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

OP is looking for a way to do this in Oracle
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.