BookmarkSubscribeRSS Feed
turcay
Lapis Lazuli | Level 10

I encounter a problem about transfering datas from Oracle to EG. I want the format in EG DD\MM\YYYY instead of DD\MMM\YYYY : Time. Is here anyone who can help me ?


Screenshot_3.png

6 REPLIES 6
Haikuo
Onyx | Level 15

Your question involves two parts: 1. Convert DateTime value to Date value. 2. Format the way you want. It can be easily done using Base code.

In EG, you will need to create computed variable: Query builder - select data - create new computed column - 1 of 4 Select a type, select 'Advanced expression' - 2 of 4 Enter an expression: DATEPART(your-Oracle-datetime) - 3 of 4, enter your new date variable name, on the bottom Format, enter ddmmyy10. and click through.

Good luck,

Haikuo

Ksharp
Super User

You need to make a Environment variable like:

export  sasdatefmt=dd/mm/yy

I forget something, search it at support.sas.com .You are going to find it .

turcay
Lapis Lazuli | Level 10

Thank you for your help. In fact, my purpose is to change the "Format" column in the "Properties" window as you see in the picture(table -> right click -> columns) . Could you give information to me on how to do that, please ? I think if i can change the “Format” column as i wanted, the “Format” column will come as DD\MM\YYYY format by default when i receive the data every time.

SASKiwi
PROC Star

How are you reading your data from Oracle? With a Query Builder query, or with a SAS program? If you are using a program, please post it.

We can't advise you on the best way of changing the date format if we don't know how you are reading your data in the first place.

sinancanturk
SAS Employee

We use query builders, and only thing we need is to view date colums with format of date9 (which is default date format for SAS). I found SASDATEFMT option but how can we set it as global variable ?

Thanks

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 6 replies
  • 2428 views
  • 0 likes
  • 5 in conversation