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.
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.)
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.
@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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.