Hi All,
I am in India and working with local timestamp.
Now I want to the what time is there in America by a select query without doing any mathematical calculation.
Thanks in advance.
Prashant T.
Printable View
Hi All,
I am in India and working with local timestamp.
Now I want to the what time is there in America by a select query without doing any mathematical calculation.
Thanks in advance.
Prashant T.
How about...
... don't forget to replace GMT with your time zone.Code:select TO_CHAR(new_time(sysdate,'GMT','PST'), 'DD-MON-YYYY HH:MI:SS') FROM DUAL;
thanks for the reply.
but tell me how to find the timezone.
thnaks.
Prashant T.
Take a look at this:
http://download.oracle.com/docs/cd/B...htm#sthref1324
Do not use new_time, you will have a probem when there there will be timezone change from EST to EDT and back. Rather use systimestamp and get a gmt time , using offset from gmt which is not changing u can get a time in any timezone.
This is gmt time:
SELECT TO_CHAR(SYS_EXTRACT_UTC(systimestamp),'DD-Mon-YYYY HH24:MI:SS') into pGmtDate FROM DUAL
thanks for reply. It works.
if we know timezone abbreciation then we can find out the time anywhere.
Please can you give me the query by which I can get abbreviations also.
Thanks again.
Prashant.