I want to create a SQL procedure on SAS with a where condition based on a date field. For example i need to count all the students born after 1 Jan 2002 The code is something like this:
PROC SQL;
SELECT COUNT(*)
FROM students t
WHERE t.birth_date > '2002-01-01'
Looking at other stackOverflow topic I found that the solution is to use the input() function, but is not clear for me how to deal with different formats.
In this example the format of the birth_date field is: 01JUL2017:00:00:00