Date Format Question

TR21Mark

Board Regular
Joined
Oct 30, 2004
Messages
240
I have several unbound textboxes on a form. They have date calculations in the control source of the textboxes. I have them set to 'Short Date' format.

This is the calculation I have in the textbox.

=DateSerial(Year([DateCode]), Month([DateCode])+1, Day([DateCode]))
(Please note that they each increment under Month +2,+3,+4 etc)

What I would like displayed in the textbox is this 'Apr-09', but what I have is 4/1/2009 because it is set to Short Date.

I went into properties of the controls and entered "mmm-yy" and when I opened the form the only thing that was showing is the actual mmm-yy letters.

Do I need to create a custom date format, or do I nest the Format function in the above calculation ( which I am not sure how to do)

Any help is much appreciated.

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

TR21Mark

Board Regular
Joined
Oct 30, 2004
Messages
240
Disregard post


I was quotations in the format section under properties "mmm-yy"

I typed mmm-yy without quotations and it works perfectly like I need it too.

Thanks
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,675
Messages
5,838,718
Members
430,566
Latest member
ChanchalSingh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top