LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 12 Dec 2007 16:58:29 -0800
Reply-To:     tanwan <tanwanzang@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         tanwan <tanwanzang@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: How to etermine if date is a holiday
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

With millions of records, adding an extra variable may not be the most efficient approach. If you really have to add an extra variable, then you might want to add a numeric variable [e.g. 1 meaning Holiday and 7 meaning Not holiday].

It depends on what you want to do ultimately. For example, if you just want to print things, or if u want to split the data, of do an analysis on purchases made on holidays vs non-holidays, and you have a format, you may not have to create another variable, leading to efficiency gains. Again, formats are potentially useful here since you know all the holidays you want, and they are very few compared to the 365/6 day in a year.

But ultimately it depends on where you are at, and your intended 'destination', and perhaps to a lesser extent, the date ranges in your data, and the computing resources available to you. Without further info, I can only 'speculate', but prima facie I would suggest take a very close look at formats. They are potentially efficient for data look-up, especially if the data are sorted.


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