How to display month and year only in a query

J

Julia Boswell

Folks, apologies if this is a dumb question, but I've done what is
recommended in A2000 Help and it doesn't seem to work....

I have a date field "fldMonthDue" which is a medium date format "dd-mmm-yy".

I want to run a query that only displays the month and year in that field
and have written:

Month: DatePart("mmmyy",[fldMonthDue])

All I get is #Error in the field.

What am I doing wrong?

Julia
 
R

Rick Brandt

Julia Boswell said:
Folks, apologies if this is a dumb question, but I've done what is
recommended in A2000 Help and it doesn't seem to work....

I have a date field "fldMonthDue" which is a medium date format "dd-mmm-yy".

I want to run a query that only displays the month and year in that field
and have written:

Month: DatePart("mmmyy",[fldMonthDue])

All I get is #Error in the field.

What am I doing wrong?


Month: Format([fldMonthDue], "mmmyy")
 
G

Guest

Thanks both, that worked great!
-----Original Message-----
You could try

Month: Format([fldMonthDue],"mm/yyyy")


Folks, apologies if this is a dumb question, but I've done what is
recommended in A2000 Help and it doesn't seem to work....

I have a date field "fldMonthDue" which is a medium
date format
"dd-mmm-yy".
I want to run a query that only displays the month and year in that field
and have written:

Month: DatePart("mmmyy",[fldMonthDue])

All I get is #Error in the field.

What am I doing wrong?

Julia


.
 

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