Solved
Contributor
Posts: 70

# Sunday to Saturday work day

I would like to create my work day as (Sunday to Saturday) range data. could you please help in getting this?

thanks,

Siva

Accepted Solutions
Solution
‎03-06-2017 07:19 AM
Super User
Posts: 24,004

## Re: Sunday to Saturday work day

Use INTNX with WEEK interval.

Week_start = intnx('week', date, 0, 'b');

week_end = Intnx('week', date, 0, 'e');

or the week function

week_num = week(date, 'u');

Intnx

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p10v3sa3i4k...

Week

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n1ka2ulrvrj...

All Replies
Super User
Posts: 24,004

## Re: Sunday to Saturday work day

What does that mean?

Contributor
Posts: 70

## Re: Sunday to Saturday work day

i have a one year data, i want weekly split (5thMar2017(Sunday)) -(11thMar2017(Saturday)

for example if i take today (5thMar2017) that should come under "05Mar-11Mar" in seperate column in SAS
Solution
‎03-06-2017 07:19 AM
Super User
Posts: 24,004

## Re: Sunday to Saturday work day

Use INTNX with WEEK interval.

Week_start = intnx('week', date, 0, 'b');

week_end = Intnx('week', date, 0, 'e');

or the week function

week_num = week(date, 'u');

Intnx

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p10v3sa3i4k...

Week

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n1ka2ulrvrj...

Contributor
Posts: 70

## Re: Sunday to Saturday work day

Thanks for Quick replay and Document.
☑ This topic is solved.