Desktop productivity for business analysts and programmers

Numeric Days to a Date Format

Posts: 0

Numeric Days to a Date Format

I have a string parameter that I have that I enter as a date (mm/dd/yyyy). I do not have this parameter enclosed in quotes because of something I am doing later in the process. I then want to subtract 1 day from this date that is being entered. So, I am trying to convert this string into a date so I can use the INTNX function. I am having troubles converting the parameter string into a date format.

Please help! Message was edited by: rmccray
Super Contributor
Super Contributor
Posts: 3,174

Re: Numeric Days to a Date Format

Try using the INPUT function in a SAS variable assignment statement, specifying the appropriate INFORMAT name as the second argument. Check resources on the SAS support website, such as the technical conference paper listed below.

Scott Barry
SBBWorks, Inc.

A Beginners Guide to SAS  Date and Time Handling
Wayne Finley, State of California HHSDC, Sacramento, CA
Valued Guide
Posts: 2,111

Re: Numeric Days to a Date Format

input(, mmddyy10.) will convert to a number, PUT(, mmddyy10.) goes the other way, so to get the new var to have a string value that is one day less,


Doc Muhlbaier
Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation