Hello,
I have a data set with a "Time" column. In this column, the data is saved in the DATETIME format (dd/mm/yyyy hh: mm). In VA, I managed to segregate the values into 2 new variables. The first being Date, the second being Time.
I, however, would like to now modify the DATE variable to exclude dates that are on the weekends. Can i get some help on this matter
Regards
Dan
Hi!
I mest you should add a FILTER, not to create a calculated item 🙂
But if you want that, just remove the ”<6” from your expression.
//Fredrik
Please try, here the x represents 6=saturday and 7=sunday which we are excluding
data want;
set have;
x=weekday('16mar97'd);
if x not in (6,7);
run;
Hi!
You can add a filter with the following expression:
DayOfWeek('Date'n) < 6
//Fredrik
Hello Mr Fredrick,
I thank you for your reply. However, when trying to input the formula, an error gets thrown stating that it is unable to carry out the process due to a type error.
Regards,
Dan
Hi!
I mest you should add a FILTER, not to create a calculated item 🙂
But if you want that, just remove the ”<6” from your expression.
//Fredrik
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.