From: FC on
I have a column with dates in the format mm/dd/yyyy. I would like to have an
additional column the will give me only the month and another only the year,
all from the above date column

Pls Advise.
Thankyou.
From: Jerry Whittle on
Do not store the month and year in other columns. Instead extract the month
and years using the Month() and Year() functions. They will give you number
of both. For example today (March 19, 2010) will show up as 3 for the month.

If you need to see March instead of 3, use the Format Function something
like below:

Format([TheDateColumn], "MMMM")
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"FC" wrote:

> I have a column with dates in the format mm/dd/yyyy. I would like to have an
> additional column the will give me only the month and another only the year,
> all from the above date column
>
> Pls Advise.
> Thankyou.
From: Jeff Boyce on
You posted in a newsgroup that supports the use of queries in MS Access.

Before you go any futher, remember that how data is stored in a table IS NOT
the same as how you may have chosen to display it (i.e., the "format").

First, is your underlying date stored in an Access date/time field? If so,
you can use the Access date/time functions to create additional columns in
your query.

To get the month of your date, you could use the Month() function on the
date, or you could use something like (untested):

YourMonth: Format([datefield],"mmmm")

Similarly, you could use the Year() function or format the date to display
only the "yyyy".

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"FC" <FC(a)discussions.microsoft.com> wrote in message
news:7012348E-3312-4DD7-8F4D-81044CD2B6C4(a)microsoft.com...
>I have a column with dates in the format mm/dd/yyyy. I would like to have
>an
> additional column the will give me only the month and another only the
> year,
> all from the above date column
>
> Pls Advise.
> Thankyou.