Date field manipulation

C

Chris Large

Try:-

NewField: IIf(Weekday([MyDate])=1,[MyDate],[MyDate]+7-
Weekday([MyDate]))

change MyDate to your field name (which shouldn't
be "Date" which is the name of an Access function).

hth

Chris
 
V

Victor

Thanks!



Chris Large said:
Try:-

NewField: IIf(Weekday([MyDate])=1,[MyDate],[MyDate]+7-
Weekday([MyDate]))

change MyDate to your field name (which shouldn't
be "Date" which is the name of an Access function).

hth

Chris
-----Original Message-----
I am trying to generate a date field in my query which shows the date of the
last sunday of every week (or the week ending date). For instance, the table
below shows the week ending date for the date field. What sort of query
critieria can i use to generate the weekending field ... thanks!

Date Week Ending
1/1/2004 1/3/2004
1/2/2004 1/3/2004
1/3/2004 1/3/2004
1/4/2004 1/4/2004
1/4/2004 1/10/2004
1/5/2004 1/10/2004
1/6/2004 1/10/2004
1/7/2004 1/10/2004
1/8/2004 1/10/2004
1/9/2004 1/10/2004
1/10/2004 1/10/2004



.
 
Top