Separate date field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know this is simple...I have a date field in a table and need to run a
report that shows the current month. I don't think I need to separate the
date and store that in a field, I just need to be able to run a report for
the current month to show orders due
 
your recordsource for the report needs to be something like

select * from TblTest Where month(myDateField)=month(now)
 
I know this is simple...I have a date field in a table and need to run a
report that shows the current month. I don't think I need to separate the
date and store that in a field, I just need to be able to run a report for
the current month to show orders due

One way is to use the Month() function; another - that takes advantage
of indexing on the date/time field - is to use a criterion of
= DateSerial(Year(Date()), Month(Date()), 1) AND < DateSerial(Year(Date()), Month(Date()) + 1, 1)

John W. Vinson[MVP]
 

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

Similar Threads

Date search query 0
Date columns 1
Updating tables when you input new data 0
Beginner Question - Month Field 3
Calculating Due Date 5
DCount error 7
Counting Unduplicate in Fiscal Year 1
date & time question 7

Back
Top