Equivalent to Oracle's New_Time()
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Equivalent to Oracle's New_Time() Expand / Collapse
Author
Message
Posted 3/21/2008 2:03:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/27/2008 5:20:06 AM
Posts: 1, Visits: 18
Hi Friends,

Can we get your kind co-operation sharing knowledge on Equivalent to Oracle's New_Time() function which we require to implement in our migration project in TD.

Oracle Function: New_Time('Timestamp',In_Zone,Out_Zone);

I appreciate your effort and time finding such valuable solutions & looking forward to get an early response in this regard soon.

Thanks... in advance,

bbhusan... a TD lover


TD Victim
Post #10997
Posted 3/21/2008 1:22:35 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 7:20:03 PM
Posts: 108, Visits: 206
I am not an expert in Oracle function. I assume you are looking for conversion from one Time Zone to another.

Teradata support "AT TIME ZONE"; see "AT TIME ZONE" in "SQL Reference: Functions and Operators" manual. I think it will help you design an expression.

For example:

select current_time, (current_time AT TIME ZONE interval -'08:00' hour to minute);


Shaw
Post #11001
Posted 4/10/2008 9:11:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/10/2008 11:08:38 PM
Posts: 1, Visits: 3
I struggled with the same thing, and New_Time only works for US time zones. The following query returns all time zone adjustments, in my case relative to Central Time:

select t.*,
tz_offset(tzname) offset,
sysdate local_time,
sysdate +
((to_number(substr(tz_offset(t.tzname), 1, 3)) / 24) -
(to_number(substr(tz_offset('US/Central'), 1, 3)) / 24) +
(to_number(substr(tz_offset(t.tzname), 1, 1) ||
substr(tz_offset(t.tzname), 5, 2)) / 1440) -
(to_number(substr(tz_offset('US/Central'), 1, 1) ||
substr(tz_offset('US/Central'), 5, 2)) / 1440)) as tz_time
from V$TIMEZONE_NAMES t
order by offset, tzname
Post #11202
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 7:47pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Disabled.