Finding a date

  • Thread starter Thread starter Bunky
  • Start date Start date
B

Bunky

I need to be able to always find the prior weeks Monday date. What is the
best way to proceed?

Thank you in advance!
 
Try something like this in a query with the proper field name:

ThePreviousMonday: [TheDateField]-DatePart("w",[TheDateField],2)-6

Jerry Whittle
 
Jerry,

Wow! Now I understand somewhat but for my understanding could I impose on
you to tell why this works? You see, I am going to need to come up with
several monday dates; this weeks, one week back, two weeks back etc. I
thought I would be able to figure it out it I used you code as a template and
the help but I cannot get it through my thick head.

Kent

Jerry Whittle said:
Try something like this in a query with the proper field name:

ThePreviousMonday: [TheDateField]-DatePart("w",[TheDateField],2)-6

Jerry Whittle

Bunky said:
I need to be able to always find the prior weeks Monday date. What is the
best way to proceed?

Thank you in advance!
 
Once you know this week's Monday, use the DateAdd function to get Monday of
previous weeks. (DateAdd("w", -1, ...), DateAdd("w", -2, ...) and so on)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bunky said:
Jerry,

Wow! Now I understand somewhat but for my understanding could I impose on
you to tell why this works? You see, I am going to need to come up with
several monday dates; this weeks, one week back, two weeks back etc. I
thought I would be able to figure it out it I used you code as a template
and
the help but I cannot get it through my thick head.

Kent

Jerry Whittle said:
Try something like this in a query with the proper field name:

ThePreviousMonday: [TheDateField]-DatePart("w",[TheDateField],2)-6

Jerry Whittle

Bunky said:
I need to be able to always find the prior weeks Monday date. What is
the
best way to proceed?

Thank you in advance!
 
Doug,

Thank you!

Douglas J. Steele said:
Once you know this week's Monday, use the DateAdd function to get Monday of
previous weeks. (DateAdd("w", -1, ...), DateAdd("w", -2, ...) and so on)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bunky said:
Jerry,

Wow! Now I understand somewhat but for my understanding could I impose on
you to tell why this works? You see, I am going to need to come up with
several monday dates; this weeks, one week back, two weeks back etc. I
thought I would be able to figure it out it I used you code as a template
and
the help but I cannot get it through my thick head.

Kent

Jerry Whittle said:
Try something like this in a query with the proper field name:

ThePreviousMonday: [TheDateField]-DatePart("w",[TheDateField],2)-6

Jerry Whittle

:

I need to be able to always find the prior weeks Monday date. What is
the
best way to proceed?

Thank you in advance!
 
Bunky said:
Jerry,

Wow! Now I understand somewhat but for my understanding could I impose on
you to tell why this works? You see, I am going to need to come up with
several monday dates; this weeks, one week back, two weeks back etc. I
thought I would be able to figure it out it I used you code as a template
and
the help but I cannot get it through my thick head.

Kent

Jerry Whittle said:
Try something like this in a query with the proper field name:

ThePreviousMonday: [TheDateField]-DatePart("w",[TheDateField],2)-6

Jerry Whittle

Bunky said:
I need to be able to always find the prior weeks Monday date. What is
the
best way to proceed?

Thank you in advance!
 

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