Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DISPLAY DATE AS WEEK OF THE YEAR

Status
Not open for further replies.

gneff

Technical User
Aug 24, 2002
15
US
I have a request from an employee to display a date as a numbered week of the year ie: 01/01/03 =1 01/02/03 = 5. I would be very appreciative if anyone has the code to do this. Many thanks in advance.
 
gneff,
An unbound text box with:
=Format$(Date(),"ww")
should do it. Or "Date()" can be replaced with your datefield.
jim
 
Some other alternate approaches could be:

= ([DateValue] - DateSerial(Year([DateValue]), 1, 1)) / 7

= DateDiff("w", [DateValue], DateSerial(Year([DateValue]), 1, 1))

Note: i've never used the datediff command, just read examples on this forum, so the usage may not be exact, but I know it can be worked to give what you're looking for.
 
Thanks all I had to do was us an existing report and change the format of the date field to ww , worked great. Thanks for the quick response
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top