Date formatting issue

B

Belinda7237

In my query I used:
Month: Format(Month([DA Peer Review]![Start Time]),"mmmm")

I created a query using the above formula so that I could add a month field
in my query (i want to be able to generate reports by month) The current
test data in my tables are all march dates and the start time field is build
off of a command button using the Now formula.
My new Month field as written above populated all
with January. Since All of my test entries are dated with march dates, it
should have returned March.

I am wondering what I am doing wrong? Does it matter that my current start
time
entries use the Now formula therefore look like:

3/14/2008 12:38:30 PM in the cell?

I also wondered what the formula would be if I wanted to return a week
instead of a month in the query (ie. week of 3.17.08)
 
T

Tom van Stiphout

On Wed, 19 Mar 2008 06:25:03 -0700, Belinda7237

Curious. You're not expecting to need this application for more than a
year, when the "January" dates of two years will be grouped together?

Your current problem is in the use of Month. Hit Ctrl+G to go to the
Immediate window and enter this:
?Format(Month(#3/14/2008 12:38:30 PM#),"mmmm")
January
?Format(#3/14/2008 12:38:30 PM#,"mmmm")
March

With the help file in hand you can probably figure out what went
wrong.

-Tom.
 

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