Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time not updatating when using sysdate Oracle on Windows

Tags:

time

oracle

Not sure what causes that problem, but when I run query

select to_char(sysdate, 'HH24:MM') from dual;

I constantly get the same time 15:08. I even check a different Oracle DBMS on different machine (also Windows) and got the same result.

like image 840
Mike55 Avatar asked Aug 12 '10 14:08

Mike55


2 Answers

HH24:MM is giving you the hours (HH) in 24-hour format, and the Month (August, 08).

You probably meant to type HH24:MI... ;)

like image 165
Eight-Bit Guru Avatar answered Sep 30 '22 13:09

Eight-Bit Guru


MM is the code for month. You want MI for minute.

like image 45
Dan Avatar answered Sep 30 '22 13:09

Dan