PC Review


Reply
Thread Tools Rate Thread

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

 
 
Chris K
Guest
Posts: n/a
 
      28th Aug 2010
I can identify this month (Month(Date())) but how do identify this week?

e.g.

=DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      28th Aug 2010
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" <(E-Mail Removed)> wrote in message
news:F0eeo.51818$r24.14610@hurricane...
>I can identify this month (Month(Date())) but how do identify this week?
>
> e.g.
>
> =DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")



 
Reply With Quote
 
Chris K
Guest
Posts: n/a
 
      28th Aug 2010
great thanks

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:i5bsmf$130$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:F0eeo.51818$r24.14610@hurricane...
>>I can identify this month (Month(Date())) but how do identify this week?
>>
>> e.g.
>>
>> =DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")

>
>

 
Reply With Quote
 
Chris K
Guest
Posts: n/a
 
      28th Aug 2010
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" <(E-Mail Removed)> wrote in message
news:GCfeo.39930$Sr7.1505@hurricane...
> great thanks
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> news:i5bsmf$130$(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:F0eeo.51818$r24.14610@hurricane...
>>>I can identify this month (Month(Date())) but how do identify this week?
>>>
>>> e.g.
>>>
>>> =DCount("[ID]","[JHPclients]","Month([start date])=Month(Date())")

>>
>>

 
Reply With Quote
 
Bob Quintal
Guest
Posts: n/a
 
      29th Aug 2010
"Chris K" <(E-Mail Removed)> wrote in
news:CLfeo.39931$Sr7.11076@hurricane:

> 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" <(E-Mail Removed)> wrote in message
> news:GCfeo.39930$Sr7.1505@hurricane...
>> great thanks
>>
>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in
>> message news:i5bsmf$130$(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:F0eeo.51818$r24.14610@hurricane...
>>>>I can identify this month (Month(Date())) but how do identify
>>>>this week?
>>>>
>>>> e.g.
>>>>
>>>> =DCount("[ID]","[JHPclients]","Month([start
>>>> date])=Month(Date())")
>>>
>>>

>




--
Bob Q.
PA is y I've altered my address.
 
Reply With Quote
 
David W. Fenton
Guest
Posts: n/a
 
      29th Aug 2010
"Chris K" <(E-Mail Removed)> wrote in
news:CLfeo.39931$Sr7.11076@hurricane:

> 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")

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/
 
Reply With Quote
 
Chris K
Guest
Posts: n/a
 
      31st Aug 2010
I'll use that thanks

"David W. Fenton" <(E-Mail Removed)> wrote in message
news:Xns9DE3A3C749234f99a49ed1d0c49c5bbb2@74.209.136.98...
> "Chris K" <(E-Mail Removed)> wrote in
> news:CLfeo.39931$Sr7.11076@hurricane:
>
>> 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")
>
> --
> David W. Fenton http://www.dfenton.com/
> contact via website only http://www.dfenton.com/DFA/


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify last date of a specific month Papa Jonah Microsoft Excel Programming 8 4th Mar 2010 02:18 AM
I need a statemnt to identify sales during each month Wanda Blankenstein Microsoft Excel Worksheet Functions 3 30th Nov 2009 06:41 PM
Identify closed/finalized records the month they were opened Acces mp80237 Microsoft Access Queries 2 25th Nov 2009 04:30 PM
Identify the week of the month =?Utf-8?B?UmFtb24=?= Microsoft Access Queries 3 19th Jul 2007 06:10 PM
Identify month in a period and run a formula =?Utf-8?B?TQ==?= Microsoft Excel Misc 4 9th Aug 2005 12:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:39 PM.