?
Solved

Converting 'timestamp with time zone' into 'timestamp' datatype..

Posted on 2011-09-07
6
Medium Priority
?
613 Views
Last Modified: 2012-05-12
i have data with 'TIMESTAMP(6) WITH TIME ZONE' ...
2 example values:
02/10/2011 12:05:05.000000 AM -05:00
05/17/2011 03:20:19.000000 AM -04:00
can you give a query to convert this into TIMESTAMP datatype after adding the TZR value..?
0
Comment
Question by:Rao_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36498192
What is the desired output?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 36498193
if you're just trying to get the GMT time


CAST(SYSTIMESTAMP AT TIME ZONE 'GMT' AS TIMESTAMP)
0
 

Author Comment

by:Rao_S
ID: 36498223
thanks sdstuber, that is what i what looking for....
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 2000 total points
ID: 36498232
if you "really" wanted to do the offset math yourself you could do it like this...



   CAST(SYSTIMESTAMP AS TIMESTAMP)
       - NUMTODSINTERVAL(EXTRACT(TIMEZONE_HOUR FROM SYSTIMESTAMP), 'hour')
       - NUMTODSINTERVAL(EXTRACT(TIMEZONE_MINUTE FROM SYSTIMESTAMP), 'minute')


but,  I recommend using the "AT TIME ZONE" method, simpler and more efficient.

as above,  use your own timestamp value for systimestamp
0
 

Author Comment

by:Rao_S
ID: 36498258
thank you...i like the 'at time zone' also.....!...
0
 

Author Closing Comment

by:Rao_S
ID: 36505022
thank you...
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to recover a database from a user managed backup
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question