Change 200801 to January 2008

J

James

I have a report that is getting a 'CurrentDate' from a static table that I
can not change.
The currentdate is in this format :yyyymm
How do I change my report so it displays January 2008, instead of 200801.
Also just using this as an example as it has all kinds of different current
dates depending on the parameters I enter...


Thanks
 
C

Conan Kelly

James,

Do you know if CurrentDate's data type is a Date/Time data type with the
format set to display "yyyymm" or if it is a text field?

If it is actually a date data type, just change the format of your control
to "mmmm yyyy".

If it is a text column, convert it to the 1st day of every month with this:

DateSerial(left([CurrentDate],4),right([CurrentDate],2),1)

Then format the control as "mmmm yyyy".

HTH,

Conan
 
J

James

It was text!

You guys are amazing, thats for your help!
Conan Kelly said:
James,

Do you know if CurrentDate's data type is a Date/Time data type with the
format set to display "yyyymm" or if it is a text field?

If it is actually a date data type, just change the format of your control
to "mmmm yyyy".

If it is a text column, convert it to the 1st day of every month with
this:

DateSerial(left([CurrentDate],4),right([CurrentDate],2),1)

Then format the control as "mmmm yyyy".

HTH,

Conan




James said:
I have a report that is getting a 'CurrentDate' from a static table that I
can not change.
The currentdate is in this format :yyyymm
How do I change my report so it displays January 2008, instead of 200801.
Also just using this as an example as it has all kinds of different
current dates depending on the parameters I enter...


Thanks
 
Top