Hi all. I run this same code only changing the first parameter of the INTCK function from "month" to "day" to "week". For "month" it returns 12 as expected. For "day" it returns 365 rows as expected. But for "week" it returns 53 when I would expect 52. Any reason I'd be getting this unexpected result?
proc sql;
create table tmp as
select distinct
1 + INTCK ("day", '01JUN2018'D, '31MAY2019'D) AS MY_NUMBER
FROM temp;
quit;
A year, 365 or 366 days, is actually slightly longer than 52 weeks, which would be 52*7 = 364 days.
A year, 365 or 366 days, is actually slightly longer than 52 weeks, which would be 52*7 = 364 days.
A year can not contain 53 full weeks, but there can be 53 week interval boundaries crossed in a full year, which is what the INTCK Function measures.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.