Hello team,
I have a date column whose date type is numeric, it is as: 7/20/2020
I want to place this date in a where clause.
Where date = '20Jul2020'd;
This doesn't bring any rows.
What is the reason?
Thanks,
blue blue
Please post the complete log of the step.
In addition to @Kurt_Bremser's request, please provide examples of typical values of the variable DATE that you are working with, and the FORMAT of the variable DATE.
If this data was imported from Excel, you might have "hidden" time information in it, because Excel stores times as fractions of a day, not counts as seconds.
As illustration run this short code and look at the log:
data _null_;
format date mmddyy10.;
date = '20Jul2020'd;
put "date as is " date;
if date = '20Jul2020'd then put "yes";
date = date + .1;
put "date after addition " date;
if date = '20Jul2020'd then put "yes"; else put "no";
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.