DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: universal time

  1. #1
    Join Date
    Mar 2002
    Posts
    56
    Is there a way to find out the universal date/time directly from Oracle based on the local date/time? I know Visual C++ has some functions for this, but I need to use it in Oracle directly.
    Thank you

  2. #2
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    So, you give it the local time and the database returns GMT?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  3. #3
    Join Date
    Mar 2002
    Posts
    56
    yes

  4. #4
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Your server's time zone is a known value (+/- x hours GMT).

    I suppose you could hard code the GMT offset .. and ..

    select to_char(sysdate,'HH24')+/-(HardCodedOffset) from dual returns current hour (and do a case for the hours around midnight) That's ugly.

    Am I barking up the right tree here?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width