Ok, I thought I had the sas date thing licked. I'm importing dates from CSVs into SAS datasets using the input function. So now I have number of seconds from 1960 or whatever. I thought doing comparisons on dates after this would be a breeze but it is not. I thought I would start by selecting the max time from my data set with proc SQL.
I'm inputing to datetime20.
proc sql;
select max(date_field) from dataset;
quit;
this returns a number in scientific notation, not sure if the accuracy of the number is lopped off.
when I try and do a compare to another datetime, I use the exact same input() to get both date times, I get an error saying the datatypes aren't the same.
proc sql;
select max(date_field) from dataset WHERE date_field < compare_date;
quit;
Am I missing something big here?
I'm inputing to datetime20.
proc sql;
select max(date_field) from dataset;
quit;
this returns a number in scientific notation, not sure if the accuracy of the number is lopped off.
when I try and do a compare to another datetime, I use the exact same input() to get both date times, I get an error saying the datatypes aren't the same.
proc sql;
select max(date_field) from dataset WHERE date_field < compare_date;
quit;
Am I missing something big here?