lundi 19 octobre 2009

finding the week number with Excel

I had to find the week number from a date,
using it for a sql statement at the end...

in my case a week is starting from monday...

Excel is doing this calculation with the function "WEEKNUM" where the first parameter is obviously the date and the second parameter can be 1 or 2, 1 for the week starting from sunday, 2 for monday.

this function WEEKNUM is part of the add-in "Analysis ToolPak",
so don't forget to add this plugin (installed with Excel)

it saved my time today ....