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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,777
Members
449,049
Latest member
greyangel23

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
Back
Top