By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,686 Members | 2,770 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,686 IT Pros & Developers. It's quick & easy.

Date Function

P: n/a
I have a query with a field named RECEIVED in which I have the
following criteria:
=DateAdd('d',-Day(Date())+1,Date())


This Criteria returns all records which show a starting with the 1st
day of the current month.

I would now like to restrict this criteria only to the records showing
a date within the month range (ex. from 11/01/2003 until 11/30/2003).
It should not show records with a date later that the curren month.

Thanks.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Paolo previously wrote:
I have a query with a field named RECEIVED in which I have the
following criteria:
=DateAdd('d',-Day(Date())+1,Date())
This Criteria returns all records which show a starting with the 1st
day of the current month.

I would now like to restrict this criteria only to the records showing
a date within the month range (ex. from 11/01/2003 until 11/30/2003).
It should not show records with a date later that the curren month.

Thanks.


Watch word wrap:
= dateserial(year(date), month(date()), 1) and < dateserial(year(date),

month(date())+1, 1)

Regards

Peter Russell
Nov 12 '05 #2

P: n/a
Between DateAdd('d',-Day(Date())+1,Date()) And
DateAdd("m", 1, DateAdd('d',-Day(Date())+1,Date()))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paolo" <jp***@tin.it> wrote in message
news:9f*************************@posting.google.co m...
I have a query with a field named RECEIVED in which I have the
following criteria:
=DateAdd('d',-Day(Date())+1,Date())


This Criteria returns all records which show a starting with the 1st
day of the current month.

I would now like to restrict this criteria only to the records showing
a date within the month range (ex. from 11/01/2003 until 11/30/2003).
It should not show records with a date later that the curren month.

Thanks.

Nov 12 '05 #3

P: n/a
Thanks Allen, I have used your code but still was showing dates
referred to the next month. What I did was just change the last +1 to
-1 and works:

Between DateAdd('d',-Day(Date())+1,Date()) And DateAdd("m", 1,
DateAdd('d',-Day(Date())-1,Date()))

"Allen Browne" <al*********@SeeSig.invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>...
Between DateAdd('d',-Day(Date())+1,Date()) And
DateAdd("m", 1, DateAdd('d',-Day(Date())+1,Date()))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paolo" <jp***@tin.it> wrote in message
news:9f*************************@posting.google.co m...
I have a query with a field named RECEIVED in which I have the
following criteria:
=DateAdd('d',-Day(Date())+1,Date())


This Criteria returns all records which show a starting with the 1st
day of the current month.

I would now like to restrict this criteria only to the records showing
a date within the month range (ex. from 11/01/2003 until 11/30/2003).
It should not show records with a date later that the curren month.

Thanks.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.