Date Range from week number

QuietRiot

Registered User.
Local time
Today, 11:54
Joined
Oct 13, 2007
Messages
71
I've tried a bunch of different things on here, but nothing is working for me.

Right now I'm using DatePart("WW", Date(),0) to get the week number.

How can I get the date range to show on my report. This is week 29. So it should show today (which is a sunday) 7/13/2008 - 7/19/2008

thanks,
QR
 
That link shows how to calculate the date of specific days of the week from a date. What part is confusing you?
 
Alright I got it. I guess I was expecting a simple formula to put in the control source.

I wrote some code on Report Activate to fill in a textbox instead from the link supplied. Seems to work today..

Code:
Private Sub Report_Activate()
Dim date1 as String, date2 As String
date1 = Date - Weekday(Date, VbSunday) + 1
date2 = Date + (7 - Weekday(Date, VbSaturday)) + 1
Me.Text12.Value = date1 & " - " & date2
End Sub
 
Between Date() And DateAdd("d",-43,Date())

You can use this in the expression.

Basicly, this expression shows records from today to 42 days previous.
 

Users who are viewing this thread

Back
Top Bottom