Date Format.... How Do I..? (1 Viewer)

rdjohnso

Registered User.
Local time
Today, 15:59
Joined
Feb 10, 2006
Messages
17
I have a report where I am trying to make the headers Jan - Dec of Current Year.. so the first coloumn header should show: January 06... but the '06'
needs to be dynamic in the se3nse that next year it should show 07.

Anyone have an idea how I can do this in a single cell?

Thanks in advance for any help.
 

spacepro

Registered User.
Local time
Today, 22:59
Joined
Jan 13, 2003
Messages
715
Create a textbox and set the controlsource to:

="Jan - Dec" & " " & Year(Now())

You can Hardcode the Jan - Dec and get the current year from today's date.

Hope this Helps
Andy
 
R

Rich

Guest
Set the display format of your date field to "MM/YY"
 

rdjohnso

Registered User.
Local time
Today, 15:59
Joined
Feb 10, 2006
Messages
17
Thanks a bunch Andy... that is very close to what I need....

Here's actually what I Put in....
="January" & " " & Format(Year(Now()),'yy')

Weird thing is.... when I do a preview for the report....
it says January 05... not 06... and Yes I checked and my
computer IS Feb06 so its not that... any ideas?

Thx agaibn for your help...

Ron


spacepro said:
Create a textbox and set the controlsource to:

="Jan - Dec" & " " & Year(Now())

You can Hardcode the Jan - Dec and get the current year from today's date.

Hope this Helps
Andy
 

spacepro

Registered User.
Local time
Today, 22:59
Joined
Jan 13, 2003
Messages
715
Ron,

Put apostrophes not single quotes around the yy part of the format:

="January" & " " & Format(Year(Now()),"yy")


Andy
 

rdjohnso

Registered User.
Local time
Today, 15:59
Joined
Feb 10, 2006
Messages
17
I did that but doesnt make a difference..... this is a weird one.


spacepro said:
Ron,

Put apostrophes not single quotes around the yy part of the format:

="January" & " " & Format(Year(Now()),"yy")


Andy
 

spacepro

Registered User.
Local time
Today, 22:59
Joined
Jan 13, 2003
Messages
715
Ron,

It works for me. Try creating a new report and put the etxtbox and enter the expression and see if it works. If it does then you must have some formatting on the textbox or report that is over-riding the xpression.

Double check on the Format property of the textbox to ensure it is blank.

See attachment.

Andy
 

Attachments

  • db2.zip
    6.8 KB · Views: 101

Users who are viewing this thread

Top Bottom