 | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | Current Date Anniversary Query Hi
I have built a very simple small db that is basically a way of recording
events in history.
What I have is the following fields: category, date, heading and details Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6600-current-date-anniversary-query.html
I am tring to do is run a query that will extract all the entries that fall
on today's date ie all the 3/11.
ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is to
extract all the current day anniversary events
I am a bit stuck what criteria to write in the query design. Tried the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
expression builder no joy..
any advice would be greatly appreciated..
thanks in advance
andy Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | Re: Current Date Anniversary Query You can use the criterion like:
..... WHERE Format([DateField], "mmdd") = Format(Date(), "mmdd")
or alternatively:
.... WHERE (Month([DateField]) = Month(Date()))
AND (Day([DateField]) =Day(Date()))
--
HTH
Van T. Dinh
MVP (Access)
"AndyH" wrote in message
news:uJoMX$H4FHA.1420@TK2MSFTNGP09.phx.gbl...
> Hi
> I have built a very simple small db that is basically a way of recording
> events in history.
> What I have is the following fields: category, date, heading and details
>
> I am tring to do is run a query that will extract all the entries that Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
> fall on today's date ie all the 3/11.
> ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is
> to extract all the current day anniversary events
> I am a bit stuck what criteria to write in the query design. Tried the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
> expression builder no joy..
>
> any advice would be greatly appreciated..
> thanks in advance
> andy
> | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | Re: Current Date Anniversary Query Spot On Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
Many many thanks
andy
"Van T. Dinh" wrote in message
news:uq6rwDI4FHA.3036@TK2MSFTNGP15.phx.gbl...
> You can use the criterion like:
>
> .... WHERE Format([DateField], "mmdd") = Format(Date(), "mmdd")
>
> or alternatively:
>
> ... WHERE (Month([DateField]) = Month(Date()))
> AND (Day([DateField]) =Day(Date()))
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "AndyH" wrote in message Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
> news:uJoMX$H4FHA.1420@TK2MSFTNGP09.phx.gbl...
>> Hi
>> I have built a very simple small db that is basically a way of recording
>> events in history.
>> What I have is the following fields: category, date, heading and details
>>
>> I am tring to do is run a query that will extract all the entries that
>> fall on today's date ie all the 3/11.
>> ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is
>> to extract all the current day anniversary events
>> I am a bit stuck what criteria to write in the query design. Tried the
>> expression builder no joy..
>>
>> any advice would be greatly appreciated..
>> thanks in advance
>> andy
>>
>
> | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | RE: Current Date Anniversary Query Andy,
Use two calls to the DatePart function to match the month and day to today's
date.
SELECT YourTable.*
FROM YourTable
WHERE ((DatePart("m",[YourDateField])=DatePart("m",Date()) And
DatePart("d",[YourDateField])=DatePart("d",Date())));
Sprinks
"AndyH" wrote:
> Hi
> I have built a very simple small db that is basically a way of recording
> events in history.
> What I have is the following fields: category, date, heading and details Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
>
> I am tring to do is run a query that will extract all the entries that fall Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
> on today's date ie all the 3/11.
> ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is to
> extract all the current day anniversary events
> I am a bit stuck what criteria to write in the query design. Tried the
> expression builder no joy..
>
> any advice would be greatly appreciated..
> thanks in advance
> andy
>
>
> | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | Re: Current Date Anniversary Query AndyH wrote:
> Hi
> I have built a very simple small db that is basically a way of recording
> events in history.
> What I have is the following fields: category, date, heading and details
>
> I am tring to do is run a query that will extract all the entries that fall
> on today's date ie all the 3/11.
> ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is to
> extract all the current day anniversary events
> I am a bit stuck what criteria to write in the query design. Tried the
> expression builder no joy..
>
> any advice would be greatly appreciated..
> thanks in advance
> andy
>
>
Events that happened on today's date:
SELECT EventName, EventDate FROM MyTable WHERE Month(EventDate) =
Month(Date()) AND Day(EventDate) = Day(Date()); Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
or
SELECT EventName, EventDate FROM MyTable WHERE Format(EventDate,
'\.mmdd') = Format(Date(), '\.mmdd');
James A. Fortune Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600 | 
04-Nov-2005, 15:19 PM
|  | Guest | | | | | | | | | | Re: Current Date Anniversary Query Thanks everyone for your help... very much appreciated..
andy
"James A. Fortune" wrote in message
news:OmKHpLI4FHA.3540@TK2MSFTNGP10.phx.gbl...
> AndyH wrote:
>> Hi
>> I have built a very simple small db that is basically a way of recording
>> events in history.
>> What I have is the following fields: category, date, heading and details
>>
>> I am tring to do is run a query that will extract all the entries that
>> fall on today's date ie all the 3/11.
>> ie pull 3/11/2004 3/11/1999 3/11/2001 etc and leave the rest. The idea is Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600
>> to extract all the current day anniversary events
>> I am a bit stuck what criteria to write in the query design. Tried the
>> expression builder no joy..
>>
>> any advice would be greatly appreciated..
>> thanks in advance
>> andy
>
> Events that happened on today's date:
>
> SELECT EventName, EventDate FROM MyTable WHERE Month(EventDate) =
> Month(Date()) AND Day(EventDate) = Day(Date());
>
> or
>
> SELECT EventName, EventDate FROM MyTable WHERE Format(EventDate, '\.mmdd')
> = Format(Date(), '\.mmdd');
>
> James A. Fortune Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6600 | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | Kirtan Yesterday 21:24 PM 0 Replies, 26 Views | Panjabi Yesterday 21:22 PM 15 Replies, 299 Views | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |