×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Datetime in sas when uploading from access

Datetime in sas when uploading from access

Datetime in sas when uploading from access

(OP)
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)

RE: Datetime in sas when uploading from access

datex = datepart(date) /* where date is the variable thats showing as date/time*/

RE: Datetime in sas when uploading from access

(OP)
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

RE: Datetime in sas when uploading from access

Put the format on the next line after the set statement.

It's the way sas reads in the pdv

RE: Datetime in sas when uploading from access

(OP)
lifesaver Bless you

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close