Why SYSDATE shows wrong time?
When I do a :
select to_char(sysdate,'yyyy-mm-dd hh:mm:ss') from dual
TO_CHAR(SYSDATE,'YY
-------------------
1999-03-24 01:03:01
It shows the wrong time....
But My System says it's 1:54
I am running Windows NT....I thought it would use the system clock..
Ans1:
Check your format again, looking for mm
mm is 2-digit month
mi is 2-digit minute
Ans2:
The problem is the format string: it must be yyyy-mm-dd hh:mi:ss.
Mind the mi. Minutes is represented by mi not bei mm. As you can see
in
your own string this is
already used for months. So it shows alway 01:03:01 because we have
march
which is the third month of the year.
Ans3:
SYSDATE pulls the date/time from the server that the database is running
on.
Are you on NT, and connecting to a different machine which has the
database on
it? If your database is running on the same maching you're on,
then I can't
figure why the date/time would be different since it's just pulling
from the
machine it's on.