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 ?
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
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 .
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.
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.
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
SAS can be configured globally - see this link: 6413 - SASDATEFMT option can be defined globally in the config file or as an environment variable wi...
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.