Jump to content

TZCONVERTOR using a column value


Manoj Chaurasia

Recommended Posts

Does anyone know how I can get this function to work reference a column value not a hard coded string I can't get to work without returning an error.

Select TZCONVERTOR (TIMESTAMP '2011-3-1 00:00:00', 'US/Pacific', 'UTC') this works

SELECT TZCONVERTOR(TIMESTAMP Cast(t.startTimestamp AS TimeStamp), 'US/Eastern', 'UTC') this won't

FROM Table1 t

Link to comment
Share on other sites

  • 1 month later...

Hi Stacey,

This works for me. Orderdate is a date column in my 'Orders' view.

If t.startTimestamp is already a timestamp I believe you don't need to put TIMESTAMP in front of it nor cast the column.

SELECT TZCONVERTOR(cast(t.orderdate as timestamp), 'US/Pacific', 'UTC') tz

FROM /shared/DEMO/OverrideDataTypes/PostgresDB/tutorial/orders t

Hope this helps.

Alain Martens

TIBCO Solutions Engineer - The Netherlands

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...