Re: Convert character sas date to numeric

Your problem is YEARCUTOFF I expect it is the same as mine which defaults to 1920 set it to something greater than your largest 2 digit year; Also you don't need PUT(EXPDATE,4.) as EXPDATE is already character, or so you say. If you want the last day of the month EXP you can advance by 0 and use E for the alignment option. This it looks like you know how INTNX works.

Re: Convert character sas date to numeric

Note sure why you are getting the wrong century, but it is not hard to add the century back in. Is the existing variable character or numeric? You text says it is character but your example code is treating it as numeric. If it is numeric then convert it to text using the Z4. format to preserve any leading zeros.