Desktop productivity for business analysts and programmers

Oracle to EG Date Format Issue

Reply
Super Contributor
Posts: 395

Oracle to EG Date Format Issue

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

Respected Advisor
Posts: 3,156

Re: Oracle to EG Date Format Issue

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

Super User
Posts: 9,875

Re: Oracle to EG Date Format Issue

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 .

Super Contributor
Posts: 395

Re: Oracle to EG Date Format Issue

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.

Super User
Posts: 3,238

Re: Oracle to EG Date Format Issue

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.

SAS Employee
Posts: 1

Re: Oracle to EG Date Format Issue

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

Super User
Posts: 3,238

Re: Oracle to EG Date Format Issue

Ask a Question
Discussion stats
  • 6 replies
  • 764 views
  • 0 likes
  • 5 in conversation