BookmarkSubscribeRSS Feed
gsmith
Obsidian | Level 7

We are using DI Studio 4.902

 

We have source databases which have different system time zones.

 

One is America/Los_Angeles, one is America/Chicago and one is America/Anchorage (Local Time)

 

To complicate this:

The America/Los_Angeles is an Oracle Database

The America/Chicago is a SQLServer database

The America/Anchorage is a MySql database

 

What we would like to do is to set the Time Zones to convert to Local time (America/Anchorage) when we extract the data from the source databases so the resultant SAS Datasets all have their DATEn. formats return the Local time without having to do this for each DATE value.

 

Ideally we'd like to do this as a global setting, or failing that, at least a setting at the job level. Is there a way to do this, or are we going to have to convert each DATEn. variable in the SAS datasets one at a time in the transformations?

1 REPLY 1
LinusH
Tourmaline | Level 20
I haven't worked with this by myself, so I can't really give any good advice on the strategy.

SAS has a global TIMEZONE option and several functions that you can play with.
http://support.sas.com/documentation/cdl/en/nlsref/69741/HTML/default/viewer.htm#n0px72paaaqx06n1ozp...

Also check for each RDBMS how SAS/ACCESS handles timestamp with time zones defined
Here's the reference for Oracle:
http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#p06jk0u30uhuj5n18f...
Data never sleeps

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1166 views
  • 0 likes
  • 2 in conversation