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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: