Want date in format mmm-yy

vbanovice123

Board Regular
Joined
Apr 15, 2011
Messages
91
Hi

I have the value as 201004 and format is General.

If I need to change the cell value to Apr-10 what should I do?

Is there a formula I can use?

Thanks

Regards,
vbanovice123
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about going just a little bit shorter (without getting too arcane):
Code:
=--TEXT(A1,"0000-00-1")
I am surprised that works as it does not follow the "international date" standard (which would require 2-digit months and days). See 2nd bulleted point under "General principles" here...

http://en.wikipedia.org/wiki/ISO_8601

I guess this must be a case of Excel being helpful.
 
Upvote 0
Or
=TEXT(A1,"0000-00-1")+0

M.

-Edit-
I hadnt seen Ron's formula
identical...
 
Last edited:
Upvote 0
Can you get that to work? I only get #VALUE! errors.
I had to change it to this: =--REPLACE(A1&"-1",5,0,"-")

Yes, it works. I'm using excel 2000.

Your formula returns the date in the usual international format:

YYYY-MM-DD

The ISO 8601, however, allows for 2 other formats

YYYY-MM, the one I used

and

YYYYMMDD

I'll try tomorrow in excel 2010.
 
Upvote 0
Yes, it works. I'm using excel 2000.

Your formula returns the date in the usual international format:

YYYY-MM-DD

The ISO 8601, however, allows for 2 other formats

YYYY-MM, the one I used

and

YYYYMMDD

I'll try tomorrow in excel 2010.
I also get the #VALUE! error in both Excel 2002 and 2007.

Maybe it has something to do with regional settings.
 
Upvote 0
Yes, it works. I'm using excel 2000.

Your formula returns the date in the usual international format:

YYYY-MM-DD

The ISO 8601, however, allows for 2 other formats
YYYY-MM, the one I used
and
YYYYMMDD
I'll try tomorrow in excel 2010.
Evidently, it stopped working, beginning with Excel 2003.
Even if I enter this formula: =--"2011-04"
I get a #VALUE! error.

This works, though: =--"2011-04-1"
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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