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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1660 views
  • 0 likes
  • 5 in conversation