I am having a problem with an Excel file being read into SAS. When I do a proc contents on the field it is defined as DATE9.
However, my compares are not working against the date. When the date from another file is compared to the date if it is less than it works but equal does not.
This code works fine;
if year(connecteddate) = 2013;
if month(connecteddate)= 06;
if day(connecteddate) = 24;
This code does not:
if connecteddate = '24JUN2013'd;
Does anyone know what the problem could be?
My import statement looks like this
PROC IMPORT DATAFILE="C:\Documents and Settings\myfiles\My Documents\File1.xlsx" OUT=File1 DBMS=Excel REPLACE;