How to see current time in America now?
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.
... don't forget to replace GMT with your time zone.
select TO_CHAR(new_time(sysdate,'GMT','PST'), 'DD-MON-YYYY HH:MI:SS') FROM DUAL;
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
how to find timezone?
thanks for the reply.
but tell me how to find the timezone.
this space intentionally left blank
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
One, who thinks that the other one who thinks that know and does not know, does not know either!
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.
Click Here to Expand Forum to Full Width