Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datetime in sas when uploading from access 1

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
US
I created a file in access with a date/time in access 2007. I changed the input mask and format to read short date. When I upload to sas it still comes in as a full date/time field. Is there a way to either force sas to accept the date as a short date or is there a script I need in sas to change it from a date time to a short date (ie 04MAY2002:00:00:00 should be 05/04/2002)
 
datex = datepart(date) /* where date is the variable thats showing as date/time*/
 
data lib.MyTable1;
set lib.MyTable;
Billed_Dt = datepart(BILLED_DATE);
format Bill_Dt mmddyy10.;
run;

Now I get what appears to be a sas system date or something
(ie 04MAY2002:00:00:00 becomes 15464, 23APR2002:00:00:00 becomes 15453 ) I attempted to address using a format statement but no luck
 
Put the format on the next line after the set statement.

It's the way sas reads in the pdv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top