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
Diamond | Level 26
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

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