I’ve incorporated the following code for the date objects in the universe:
Now let’s take it apart. Oracle can convert a “timestamp with time zone” data type (yes, it really is called that) to another time zone. Work inside out …
to_date(‘12/15/1970’, ‘mm/dd/yyyy’) + (Tbl.LAD / 86400) returns a DATE data type.
cast( DATE AS TIMESTAMP) converts it to a TIMESTAMP data type.
from_tz( TIMESTAMP, ‘GMT’) converts it to a TIMESTAMP WITH TIME ZONE data type as GMT.
Finally the AT LOCAL parameter switches it to the local users timezone.
However, I’m now experiencing query failures with a message “Invalid Month”. I’ve tried to recast the object as a DATE but this isn’t working. The goal is this: 1) Show the Date in the user’s Local Time Zone, and 2) Allow the same date field to be used as part of the Query Selection.
I know it’s been a long time since you posted this but I’m trying to do the same thing with my universe against an Oracle db…would you still have the SQL syntax you wrote for each object?