Why do to the trouble to make a photograph of text, store it in a PDF file and then upload the file?
Just copy and past the text into the forum editor. Use the Insert SAS Code icon to get a pop-up window to paste/edit the code so its formatting is retained.
Your example program is not reading in dates. It is instead making a character variable named DATE. To make a numeric variable use the DDMMYY informat. Then attach a format to the numeric variable so it prints in a way that humans will understand. Avoid using DDMMYY or MMDDYY format as either one will confuse half of your audience. Use the DATE format or the YYMMDD format instead and avoid the confusion.
Once you have date values then you can just subtract them to find the difference in days between the two dates.
... View more