Oracle 11g - System Date & Time

Hello:

Would like to have the general query command to run against an Oracle 11g database that will provide me the system date and time for the database.  I've used it before, but can't find it.  

"select * from v$instance" does work, but at one time I thought it did.  I'm using SQL Developer to run my queries and usually I have no problems with simple queries.  I've obviously not typing my command correctly.
akdreamingAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sdstuberConnect With a Mentor Commented:
select sysdate from dual;  -- to the second

select systimestamp from dual; -- subsecond value with timezone
0
 
dsackerContract ERP Admin/ConsultantCommented:
The SYSDATE may be what you're looking for:

select to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS') as "Current Time"
from dual;

Open in new window

0
 
akdreamingAuthor Commented:
This guy gave two bulls-eye scripts for me to run.  I was able to get what I needed.  First responder provided an error in the script, something to do about "From".  Thanks for the tip.  I'm not an true Oracle DBA, so this is very helpful.
0
 
sdstuberCommented:
dsacker's post should have worked too,  the only difference between that query and mine is he formatted the output as a string where as mine returns the date value in native form, leaving it to the client to interpret/display it.
0
All Courses

From novice to tech pro — start learning today.