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
Example:
strWeek = WeekNumber(Now()) 'Function to get the week number
strWeek returns 3 since this is the 3rd week of the month.
Thanks
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you! Just what i wanted.
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