BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ahsan
Calcite | Level 5
I didn't move any data. SAS EG is connected to Oracle database so how I see date and time in SQL developer I want to see the same in SAS.
Tom
Super User Tom
Super User

@Ahsan wrote:
I didn't move any data. SAS EG is connected to Oracle database so how I see date and time in SQL developer I want to see the same in SAS.

EG is a Windows program you are running on your PC to connect to a server running SAS, not Oracle. The only way it can get data from Oracle is if you used some SAS commands to connect your SAS session to your Oracle database.

So what did you run?

Did you create a SAS libref that points to a schema (database) in Oracle?

Did you use PROC SQL to connect to Oracle and write a passthrough query to pull some data from Oracle?

Did you push some buttons in EG? What type of buttons?

 

You probably need to either change how the data is defined in Oracle so that SAS can autodetect that you want the full datetime value for that variable.  Or tell SAS your self how to treat that variable.  Look at the DBSASTYPE= dataset option.

 

http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001371572.htm

Ahsan
Calcite | Level 5
I just login in SAS EG and which connect to Oracle library.
Ahsan
Calcite | Level 5
I used SQL Pass through and use the same code which I used in SQL developer and got the desired result.
ChrisNZ
Tourmaline | Level 20

You can also use SQL pass-through in SAS and use the to_char() function if you want.

There are many papers on how to do this.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 2119 views
  • 0 likes
  • 6 in conversation