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