|
-
Dec 12th, 2003, 10:58 AM
#1
Thread Starter
Lively Member
Return the Week Number and Month's name !
I have a date filed in an access report , i would like to find a function or something that will take the date value and return a string that tells the week number and the month's name ...
appreceate any help
-
Dec 12th, 2003, 01:27 PM
#2
New Member
You can use the DatePart function to return integers representing the components of your date..
eg
If your date is 12/16/2003
Code:
Dim weekday As Integer
Dim month As Integer
weekday = DatePart("w", date_value)
month = DatePart("m", date_value)
-
Dec 12th, 2003, 03:37 PM
#3
Thread Starter
Lively Member
thanks for your reply ,, but can you tell me who can i put this in an expresion window in an access report please
-
Dec 26th, 2003, 02:02 PM
#4
Lively Member
Re: Return the Week Number and Month's name !
Originally posted by stono
I have a date filed in an access report , i would like to find a function or something that will take the date value and return a string that tells the week number and the month's name
To return the week number:
Code:
intWeekNumber = CInt(Format(Date(), "ww"))
To return the Month name:
Code:
strMonthName = Format(Date(), "mmmm")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|