English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In microsoft excel, I can get the dd/mm/yyyy converted to show just the month, but I need to change it into the year aswell, so for example 21/01/2007 becomes JAN-07 or and 30/03/2006 becomes MAR-06. Please could someone help me do this?

2007-06-28 22:52:33 · 6 answers · asked by Kidney 1 in Computers & Internet Programming & Design

In microsoft excel, I can get the dd/mm/yyyy converted to show just the month, but I need to change it into the year aswell, so for example 21/01/2007 becomes JAN-07 or and 30/03/2006 becomes MAR-06. Please could someone help me do this?

UPDATE: I have done this again, however, when i try to put this into a PIVOT table to count the amounts per month, it still reads each column as an individual unique number. So I have 12 rows for Jan-07 with a count of one, rather than one row for Jan-07 with a count of 12. I could group the rows, but dont want something so labour intensive.

2007-06-28 23:21:15 · update #1

6 answers

The customised format you want is mmm-yy

2007-06-28 23:26:56 · answer #1 · answered by AnalProgrammer 7 · 0 0

Yes. It's simple. On the Menu Bar >Format>Cells>. On the 'Number' Tab>Date. Pick what you want from the right-hand box. If you want another choice then Menu Bar>Format>Cells. On the 'Number' Tab>Custom, and choose again from the right-hand box.

2007-06-29 06:02:17 · answer #2 · answered by Frank Furillo 5 · 0 0

Try the following code
//take your date in string
string str = "30-04-2006";
//convert it into DateTime object by parsing the string with the given format
DateTime dt = DateTime.ParseExact(str,"dd-MM-yyyy", null);

string strRequiredDate = dt.ToString("yyyy/dd/MM");
//The expression what you have given as parameter to "ToString" method, The datetime object is converted in that

2007-06-29 06:01:31 · answer #3 · answered by Prabhakar G 6 · 0 0

Right click the colum select format cells
In the number tab select date then pick the format you wish.

You could also validate the data so only that format is entered?

2007-06-29 05:56:40 · answer #4 · answered by deburca98 4 · 2 0

right click on that date then go to format cell, under icon number, click on date, then choose the format u want.

2007-06-29 06:03:41 · answer #5 · answered by moonrider 6 · 0 0

Go to Format, Cells and then Date and choose the one you want. : )

2007-06-29 05:57:17 · answer #6 · answered by Anonymous · 1 0

fedest.com, questions and answers