[AccessD] Max Date of Week

Gustav Brock Gustav at cactus.dk
Tue Feb 27 13:40:32 CST 2007


Hi Mark

Or just too busy?

/gustav

>>> markamatte at hotmail.com 27-02-2007 20:31:48 >>>
Thanks Gustav,

Thats what I thought I did yesterday...and it didn't work...hence my 
confusion.

And of course it works now...I must be losing my mind.

Thanks,

Mark A. Matte


>From: "Gustav Brock" <Gustav at cactus.dk>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: <accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Max Date of Week
>Date: Tue, 27 Feb 2007 20:15:11 +0100
>
>Hi Mark
>
>For Monday as the first day of a week, it could be:
>
>   SELECT
>     Max([DateField]) As DateMax,
>     DatePart("ww", [DateField], 2, 2) As WeekNo
>   FROM
>     tblYourTable
>   GROUP BY
>     DatePart("ww", [DateField], 2, 2)
>
>If this is for critical use and you need the correct ISO 8601:1988 
>weeknumber for week 53 as well, you should use the function for this I've 
>posted many times:
>ISO_WeekNumber
>
>/gustav
>
>
> >>> markamatte at hotmail.com 27-02-2007 19:13:57 >>>
>Hello All,
>
>I can't seem to get the SQL for this...I have a date field...I need to 
>group
>by week, but display the greatest date value in that week.
>
>Any ideas?
>
>Thanks,
>
>Mark A. Matte





More information about the AccessD mailing list