LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Mar 2000 13:15:58 +0100
Reply-To:     detecsm_hellriegelg@WESTLB.DE
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject:      Re: tradind-day between two dates
Comments: cc: Gerhard.hellriegel@telekom.de
Content-type: text/plain; charset=us-ascii

the problem are not the saturdays and sundays, but the holidays! The holidays are different not only in foreign countries, but also in different regions of the same countries or even are defined individually for a site (birthday of the CEO maybe a holiday, but christmas maybe not!). What I did once, was to create a format to calculate all variable holidays with the formula of Gauss. Then added the option to exclude / include some of them and the option to see sundays as holidays. I can send the macro to create the format to you (this evening, if I have it at home, or the weekend, if not). With this format you can see for each day, if it is a workday. It returns "***" for workdays, which you can count. You could just create another macro to return you the no of workdays between two given dates. You can also create a format for your own. Just create a table with saturdays and sundays, add your individual list of dates for other holidays and create a format for all those dates. Mark them with "H" for holidays and all "others" (HLO-variable for the control dataset) with "W" for workday. Use that format in a PUT funktion to count the workdays between two given dates. Let me know, if you need help for that.

Gustavo Favaro <favaro@CENAPAD.UNICAMP.BR> on 22.03.2000 12:33:29

Bitte antworten an Gustavo Favaro <favaro@CENAPAD.UNICAMP.BR>

An: SAS-L@LISTSERV.UGA.EDU Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB) Thema: tradind-day between two dates

Sorry, could I explain what I need.

I need the difference betwee two sas date, but without saturday, sundays and holidays.

Is there any sas function or program to do it in the sas?

Regards, Gustavo

---------- Forwarded message ---------- Date: Tue, 21 Mar 2000 18:15:58 -0300 (EST) From: Gustavo Favaro <favaro@delos.cna.unicamp.br> Reply-To: favaro@bigfoot.com To: listserv@listserv.uga.edu Subject: tradind-day between two dates

Hi Friends,

I would like to know how can I calculate the number the tradind-day between two dates?

Is there any function or program in the SAS?

Thanks, Gustavo Favaro

Mit freundlichen Gruessen

DeTeCSM, Gerhard Hellriegel

WestLB Abteilung: 001-80622 Aderstr. 22 D - 40217 Duesseldorf Tel.: +49211 826 6173 Fax: +49211 826 5393


Back to: Top of message | Previous page | Main SAS-L page