I can identify this month (Month(Date())) but how do identify this week?

C

Chris K

I can identify this month (Month(Date())) but how do identify this week?

e.g.

=DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")
 
C

Chris K

can it be called once to return week & year

DatePart("ww,yyyy", Date())

or would i need to call it twice to return both?



Chris K said:
great thanks

Douglas J. Steele said:
DatePart("ww", Date())

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele/AccessIndex.html
Co-author: "Access 2010 Solutions", published by Wiley
(no private e-mails, please)


Chris K said:
I can identify this month (Month(Date())) but how do identify this week?

e.g.

=DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")
 
B

Bob Quintal

can it be called once to return week & year

DatePart("ww,yyyy", Date())

or would i need to call it twice to return both?
DatePart works on a single interval. There is no DateParts()
function.
But Format([somedate],"ww,yyyy") will format the date as you want it.
Chris K said:
great thanks

Douglas J. Steele said:
DatePart("ww", Date())

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele/AccessIndex.html
Co-author: "Access 2010 Solutions", published by Wiley
(no private e-mails, please)


I can identify this month (Month(Date())) but how do identify
this week?

e.g.

=DCount("[ID]","[JHPclients]","Month([start
date])=Month(Date())")
 
D

David W. Fenton

can it be called once to return week & year

DatePart("ww,yyyy", Date())

or would i need to call it twice to return both?

You should look at Format():

Format(Date(), "ww, yyyy")
 

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

Top