Skip to content
Advertisement

why subtracting two time doesn’t work properly in oracle

I want to calculate system time till that day 17:00 in minutes in plsql, and I write the below query but it doesn’t work :

can someone help me?

Advertisement

Answer

My guess is that you want

If that isn’t what you want, it is helpful to provide some details and a test case to show exactly what you want to happen rather than just saying that something “doesn’t work”. My guess is that you’re getting an error because your second to_date is doing an implicit date to string conversion using your session’s nls_date_format which probably doesn’t match the explicit date format you specified. But that’s just a guess.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement