proc sql;
create table dummy as
Select * from MR
where 'Date Of approval'n GE '01-09-2022:00:00:00am'dt. AND 'Date Of approval'n LE '30-11-2022:00:00:00am'dt.;
quit;
The date in a datetime literal must be written in the same DATE9. format like a date literal, e.g. '01jan1960:00:00:00'dt. Do not use am/pm, but 24-hour notation.
The date in a datetime literal must be written in the same DATE9. format like a date literal, e.g. '01jan1960:00:00:00'dt. Do not use am/pm, but 24-hour notation.
So, does that mean its a limitation for me as the data I have is in ddmmyy format. So, I first have to convert that data in date9 format in excel and then use it as my data. That's really tedious. BTW thanks for the solution kindly suggest if there are any other alternative.
If you have SAS datetime values, the display format is irrelevant, as the underlying raw values are counts of seconds, starting at 1960-01-01T00:00:00.
If you do not have SAS datetimes, but character strings, these must be converted first. This should be done when the data is imported into SAS.