02-01-2017 06:33 AM
I have this format of a birth date : 06FEB81:00:00:00 and from this I have to calculate the age of the person. How I have to format this in order to be able to use it and then what? Thanks in advance!
02-01-2017 06:59 AM
02-01-2017 07:10 AM
02-01-2017 10:44 AM
Note that what you see is a pet peeve of mine, which seems to come from some defaults and/or lazy programming in some applications: storing DATE values as DATETIME. If your data, or your use, has not actual need of the time component you can reduce the variable to only date values using: Date = datepart(datetimevariable); (you could use the same variable as the result) and assign appropriate format for display.
Otherwise in the INTCK and INTNX functions when using a period like 'year' or 'month' you preface the period with 'dt' to tell SAS the value is a date time, hence the 'dtyear'
02-01-2017 12:05 PM
On top of what @ballardw said, date values can be stored in 4-byte numeric variables, while datetimes need all 8 bytes of the default numeric length.