BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi All,

I have a problem with converting Oracle date format in EG.
How do I convert Oracle date into date usable under EG?

i.e. in SQL query i can convert with function (todate(&date,'J'), do we have sth similiar in EG?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Can you explain, in a bit more detail what is wrong or what is the format of your Oracle date. For example, in some relational databases, dates are not just dates (month, day, year) but they are stored as "date/time" values (month,day,year,hour,minutes,seconds).

When you show the function (todate(&date,'J') can you explain what the 3 major components of the function are or what they do:
todate
&date
'J'

Is this an Oracle-specific function??? If so, what does the entire function do? What is the entire SQL statement or query in which this function appears? Are you trying to convert this SQL query from Oracle SQL to SAS PROC SQL???

A bit more info is needed.

cynthia
twocanbazza
Quartz | Level 8
Hi.

Oracle Dates are usable in SAS/EG.

If you have a date in Oracle (oracle dates are Datetime), shouldn't the only thing you need to do is apply a SAS Datetime format on the SAS / EG Side?

If you only want the datepart, use the SAS datepart function.

Cheers

Barry

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2 replies
  • 1829 views
  • 0 likes
  • 3 in conversation