Date field manipulation

  • Thread starter Thread starter Chris Large
  • Start date Start date
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
 
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



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top