On Wed, 7 Sep 2005 18:25:02 -0700, Wil wrote:
I would like to know how to convert/translate the numeric value that WEEKNUM
returns into a date format. What is the best way to do this?
If you change the numeric value returned by WEEKNUM to a date format, you will
display a date in the year 1900 or 1904.
To convert that value, merely select Format/Cells/Number Date (and choose one
of those options). Or use the formula =TEXT(wn,"dd-mmm-yyyy") or some other
format.
Maybe you mean something else?
For example, perhaps you mean "what date does a weeknum of 'numeric_value'
represent"?
If that is the case, then you have to specify both the year, as well as which
day of the week you want returned. Weeknum considers Jan 1 as being the first
day of Week 1; and the next Sunday (or Monday) as being the first day of week
2.
Once you specify your parameters, performing the conversion is simply a matter
of adding 7*wn to Jan 1 of the relevant year, and then adjusting for the day of
the week you wish to return; as well as whether or not Week 1 is a partial week
or a full week.
--ron
|