Link to home
Start Free TrialLog in
Avatar of MadDog986
MadDog986

asked on

Get the week number in the month

I need a function that will take todays date (using Now()) and get the week number of the month. I cant seem to figure it out.

Example:

strWeek = WeekNumber(Now()) 'Function to get the week number

strWeek returns 3 since this is the 3rd week of the month.

Thanks
Avatar of casstd
casstd

Hi,

         Here is the code  Response.write WeekDay(Date()). This returns 3.

You can look at this site for various date functions.

http://www.ronshardwebapps.com/tips/jantutorialtimedate.asp
Avatar of MadDog986

ASKER

I just tried that and it returns 2, not 3.
it does return 3. Check your system date and month and year.
ASKER CERTIFIED SOLUTION
Avatar of j2nku
j2nku
Flag of Estonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you! Just what i wanted.