Senin, 06 Agustus 2012

[MS_AccessPros] Re: Week ending on Monday

 

Troy

Here is a function I use.

Function DateFromWeek(intYr As Integer, intWk As Integer, intWeekDay As Integer)
'Purpose : Get date from week number.
'DateTime : 5/3/2000
'Author : Bill Mosca

DateFromWeek = DateSerial(intYr, 1, ((intWk - 1) * 7) _
+ intWeekDay - Weekday(DateSerial(intYr, 1, 1)) + 1)

End Function

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "Troy Sherven" <tsherven@...> wrote:
>
> I'm writing an Access report showing data grouped by week, with the week
> ending on Monday. I was able to successfully accomplish the grouping
> I'm looking for using week number. Now my challenge is figuring out how
> to label the group footers. I want to add a label that say's something
> like "Week ending 8/6/2012" instead of "Week ending 32". My question
> is, how can I convert a week number into an actual date?
>
>
>
> Thanks,
>
>
>
> Troy Sherven
>
> MCD, Inc.
>
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar