Difference between sysdate and current_date [message #451566] |
Thu, 15 April 2010 08:24  |
knw15pwr
Messages: 134 Registered: March 2010
|
Senior Member |
|
|
What is the difference between the values of sysdate and current_date ?
On querying the database I got the results as
sysdate = the date and time for the database server location
and current_date = my local system date
If however, i change my local system date - it still shows the correct date.
Myunderstanding was that current_date uses the dbtimezone.
But..
SQL> select sysdate,current_date from dual;
SYSDATE CURRENT_DATE
-------------------- --------------------
15-APR-2010 06:06:14 15-APR-2010 18:36:15
SQL> select dbtimezone from dual;
DBTIME
------
+00:00
SQL>
|
|
|
|
|
|
|
|
|
|
Re: Difference between sysdate and current_date [message #451578 is a reply to message #451571] |
Thu, 15 April 2010 09:20   |
knw15pwr
Messages: 134 Registered: March 2010
|
Senior Member |
|
|
Thanks cookiemonster and Michel.
@Michel - i did read the link. I failed to understand how it was implemented especially since DBTIMEZONE showed +00:00. So i assumed that the SESSIONTIMEZONE is something relative to this.
Which brings me another confusion -
Is the timezone in DBTIMEZONE different from the one that is reported by the command SYSTIMESTAMP ?
SQL> select systimestamp from dual;
SYSTIMESTAMP
----------------------------------------
15-APR-10 07.00.47.197235 AM -07:00
SQL> select dbtimezone from dual;
DBTIME
------
+00:00
@Rahul - yes i google'd. That is why my question was more specific -including the timezone.
|
|
|
|