How to display month and year only in a query

  • Thread starter Thread starter Julia Boswell
  • Start date Start date
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
 
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")
 
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


.
 
Back
Top