Date conversion??

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hello. I have some columns in a table which have the
date of an event (1/6/04 format). I want to create a
query that will take the 1/6/04 date and give the
month/year in seperate columns. For example:

Test_Completed Completed_Month Completed_Year
1/6/04 January 2004

How do yo go about doing this? I am a beginner when it
comes to Access and can't figure it out. Thanks in
advance.

Jeff
 
Hi Jeff,
There are lots of built in functions to help.
Create 2 new fields in your query.

Mth:FORMAT([your date],"mmmm")
YR:YEAR([your date])
 
DatePart function
Datepart("m",YourDate)-but it will be the month number
DatePart("yyyy",YourDate)
Also search MSDN for DatePart for more info. This is a
nifty little date tool.
to use this like you suggested, in your query in the
column header in design mode enter the following
Completed_Month:DatePart("m",Yourdate)
do the same for the year.
 
Thanks for all the help Frank and Les. I have what I
need now.

Jeff
-----Original Message-----
Hi Jeff,
There are lots of built in functions to help.
Create 2 new fields in your query.

Mth:FORMAT([your date],"mmmm")
YR:YEAR([your date])

-----Original Message-----
Hello. I have some columns in a table which have the
date of an event (1/6/04 format). I want to create a
query that will take the 1/6/04 date and give the
month/year in seperate columns. For example:

Test_Completed Completed_Month Completed_Year
1/6/04 January 2004

How do yo go about doing this? I am a beginner when it
comes to Access and can't figure it out. Thanks in
advance.

Jeff

.
.
 
Back
Top