Date & Month

  • Thread starter Thread starter Ady
  • Start date Start date
A

Ady

Hi There

I have a column called "Date Sent" for example 15/01/2004.

I need to create a column next to it called "Month" that will display the
month of the "Date sent "column. Simulated below:

Date Sent Month
======= =====
15/01/2004 January
28/06/2003 June

I can not work out the formula that will display the month based on the data
that is inputted into "Date Sent".

Any help would be highly appreciated. Many thanks in advance!

Regards

Ady
 
Hi There

I have a column called "Date Sent" for example 15/01/2004.

I need to create a column next to it called "Month" that will display the
month of the "Date sent "column. Simulated below:

Date Sent Month
======= =====
15/01/2004 January
28/06/2003 June

I can not work out the formula that will display the month based on the data
that is inputted into "Date Sent".

Any help would be highly appreciated. Many thanks in advance!

Regards

Ady

Ady,

If you are doing this for a report, you do not need any special
control.
Just set the [DateSent] format property to
mmmm

If you must do this in a query:
MonthSent:Format([DateSent],"mmmm")

Notice I did not make the name of the column "Month".

Month, like many other words is an Access/VBA reserved word.
Using it as a field name will create future problems.

See Microsoft KnowledgeBase article:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
 
Hi There

I have a column called "Date Sent" for example 15/01/2004.

I need to create a column next to it called "Month" that will display the
month of the "Date sent "column. Simulated below:

Date Sent Month
======= =====
15/01/2004 January
28/06/2003 June

I can not work out the formula that will display the month based on the data
that is inputted into "Date Sent".

Don't call it Month: that's a reserved word.

Instead, in a vacant Field cell, type

Month Sent: Format([Date Sent], "mmmm")
 
Hi There

Many Thanks Will take your advice!

Ady

John Vinson said:
Hi There

I have a column called "Date Sent" for example 15/01/2004.

I need to create a column next to it called "Month" that will display the
month of the "Date sent "column. Simulated below:

Date Sent Month
======= =====
15/01/2004 January
28/06/2003 June

I can not work out the formula that will display the month based on the data
that is inputted into "Date Sent".

Don't call it Month: that's a reserved word.

Instead, in a vacant Field cell, type

Month Sent: Format([Date Sent], "mmmm")
 
Back
Top