Hi:
The simple answer is that you need to use the right method for referencing the date:
where current_hire_date between "01Sep2006"d and "31Aug2007"d;
The d after the date is called a date constant. You can look up how the date constant, the datetime constant and other constants work in the SAS online documentation or help files.
The above code makes the assumption that CURRENT_HIRE_DATE contains a DATE value (number of days since Jan 1, 1960) and NOT a DATE/TIME value. For more help with these concepts or for quick resolution of your code issues, you might consider contacting Tech Support.
cynthia
Hi:
The simple answer is that you need to use the right method for referencing the date:
where current_hire_date between "01Sep2006"d and "31Aug2007"d;
The d after the date is called a date constant. You can look up how the date constant, the datetime constant and other constants work in the SAS online documentation or help files.
The above code makes the assumption that CURRENT_HIRE_DATE contains a DATE value (number of days since Jan 1, 1960) and NOT a DATE/TIME value. For more help with these concepts or for quick resolution of your code issues, you might consider contacting Tech Support.
cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.