BookmarkSubscribeRSS Feed
SASCustomer
Calcite | Level 5

From proc sql, My Sas load_date output:  01AUG2019:00:00:00.000000. I need help convert the load_date to mm/dd/yyyy Oracle Database Format. 

3 REPLIES 3
Tom
Super User Tom
Super User

You need to provide more detail on what you are trying to do. 

Did you create a SAS dataset from data in Oracle?  If so you need to understand that Oracle does not have a DATE data type.  Only a datetime data type.  That would explain why what you are seeing in the SAS dataset has a datetime value instead of a date value.

So is the ask to convert the datetime value to a date value? If so you can use the DATEPART() function to convert the number of seconds used to store datetime values into the number days used to store date values in SAS. Once you have a date value you can attach any format of the many formats that SAS has to display date values.  The way you are showing the date value looks like the MMDDYY10. format.  (Note that using that format to display dates will confuse the half of your audience that prefers to display dates in DMY order instead of MDY order. If you use either the DATE or YYMMDD format you can avoid that confusion.)

 

SASCustomer
Calcite | Level 5

Tom pulling a min load_date from Neteeza using proc sql. I need to take the output value convert to oracle mm/dd/yyyy format. Can you provide example with some sample code.

Tom
Super User Tom
Super User

@SASCustomer wrote:

Tom pulling a min load_date from Neteeza using proc sql. I need to take the output value convert to oracle mm/dd/yyyy format. Can you provide example with some sample code.


Please show what you tried and explain how it didn't work.

Sounds like you are doing something like:

libname in neteeza ....;
libname out oracel ....;
data out.want;
  set in.have;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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