From: Joe Matise on
INTNX should handle that for you, with the WEEKDAY argument, if I understand
it correctly.

-Joe

On Tue, Dec 15, 2009 at 3:54 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:

> Hi everyone,
>
> I'm implementing an event study. However, I'm having a problem with
> weekends
> and bank holidays. Is there a way/function in SAS to get the next weekday
> following a given date? Imagine that the date being analyzed is 12.12.2009,
> which is a Saturday. The next weekday would then be 14.12.2009. Another
> example would be 14.12.2009 and the next weekday would be 15.12.2009.
>
> All the best,
>
From: Nuno Soares on
wow that was fast! Thank you Joe!

On Tue, Dec 15, 2009 at 9:58 PM, Joe Matise <snoopy369(a)gmail.com> wrote:
> INTNX should handle that for you, with the WEEKDAY argument, if I understand
> it correctly.
>
> -Joe
>
> On Tue, Dec 15, 2009 at 3:54 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:
>>
>> Hi everyone,
>>
>> I'm implementing an event study. However, I'm having a problem with
>> weekends
>> and bank holidays. Is there a way/function in SAS to get the next weekday
>> following a given date? Imagine that the date being analyzed is
>> 12.12.2009,
>> which is a Saturday. The next weekday would then be 14.12.2009. Another
>> example would be 14.12.2009 and the next weekday would be 15.12.2009.
>>
>> All the best,
>
>
From: Joe Matise on
Don't forget that my solution ignores holidays - ie, 12/25/09 is considered
a weekday. If you need to exclude those, you need to do so based on a
holiday table of some sort.

-Joe

On Tue, Dec 15, 2009 at 4:00 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:

> wow that was fast! Thank you Joe!
>
> On Tue, Dec 15, 2009 at 9:58 PM, Joe Matise <snoopy369(a)gmail.com> wrote:
> > INTNX should handle that for you, with the WEEKDAY argument, if I
> understand
> > it correctly.
> >
> > -Joe
> >
> > On Tue, Dec 15, 2009 at 3:54 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:
> >>
> >> Hi everyone,
> >>
> >> I'm implementing an event study. However, I'm having a problem with
> >> weekends
> >> and bank holidays. Is there a way/function in SAS to get the next
> weekday
> >> following a given date? Imagine that the date being analyzed is
> >> 12.12.2009,
> >> which is a Saturday. The next weekday would then be 14.12.2009. Another
> >> example would be 14.12.2009 and the next weekday would be 15.12.2009.
> >>
> >> All the best,
> >
> >
>
From: rjf2 on
> From: Nuno Soares
> Subject: Getting next weekday
>
> Hi everyone,
>
> I'm implementing an event study. However, I'm having a
> problem with weekends
> and bank holidays. Is there a way/function in SAS to get the
> next weekday
> following a given date? Imagine that the date being analyzed
> is 12.12.2009,
> which is a Saturday. The next weekday would then be
> 14.12.2009. Another
> example would be 14.12.2009 and the next weekday would be 15.12.2009.
>
> All the best,

the definitive reference for these tricks is:

http://www.sascommunity.org/wiki/Pretty_Dates_All_in_a_Row

Pretty Dates All in a Row,
Dianne Louise Rhodes

http://www2.sas.com/proceedings/sugi30/055-30.pdf

topics: intck, intnx, macro variables, Proc Tabulate
From: Murphy Choy on
Hi,

I am not sure whether this is useful information. In SAS, there is a proc calendar that allows you to input holidays and then it produces a calendar. Maybe you can tweak it to produce a calendar list?


------Original Message------
From: Joe Matise
Sender: SAS(r) Discussion
To: SAS-L(a)LISTSERV.UGA.EDU
ReplyTo: Joe Matise
Subject: Re: Getting next weekday
Sent: Dec 16, 2009 6:45 AM

Don't forget that my solution ignores holidays - ie, 12/25/09 is considered
a weekday. If you need to exclude those, you need to do so based on a
holiday table of some sort.

-Joe

On Tue, Dec 15, 2009 at 4:00 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:

> wow that was fast! Thank you Joe!
>
> On Tue, Dec 15, 2009 at 9:58 PM, Joe Matise <snoopy369(a)gmail.com> wrote:
> > INTNX should handle that for you, with the WEEKDAY argument, if I
> understand
> > it correctly.
> >
> > -Joe
> >
> > On Tue, Dec 15, 2009 at 3:54 PM, Nuno Soares <ndsoares(a)gmail.com> wrote:
> >>
> >> Hi everyone,
> >>
> >> I'm implementing an event study. However, I'm having a problem with
> >> weekends
> >> and bank holidays. Is there a way/function in SAS to get the next
> weekday
> >> following a given date? Imagine that the date being analyzed is
> >> 12.12.2009,
> >> which is a Saturday. The next weekday would then be 14.12.2009. Another
> >> example would be 14.12.2009 and the next weekday would be 15.12.2009.
> >>
> >> All the best,
> >
> >
>


Sent from my BlackBerry Wireless Handheld

--
Regards,
Murphy Choy

Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
 |  Next  |  Last
Pages: 1 2
Prev: SAS renewal
Next: Good to know about anydtdte