Formatting Dates in Excel the better way using Custom Number Formatting – How To

0
748

Time is of prime importance and having dates in your data is most of the time essential bit of whole. However, making the dates look the way we want is often cumbersome in spreadsheets as sometimes it changes, flips on its own or it doesn’t work the way want it to. This definitely frustrates many and I was one of them. But soon I learnt its not the Excel that has any problem, its just my lack of knowledge to tame Excel the way I want it to work.

Have a look at the different formats that we might desire for the same date:

date formats example

Want to learn how to do this? That’s where my favourite feature Customer Number Formatting comes handy. Yes dates are considered numbers by Excel.

Using predetermined / built-in formats

Excel offers you great variety of preformatted options to display date. By default dates your shown in the following format: month/day/year. And these are all in numbers. To change the format to a certain predefined format, select the cell holding date and hit Ctrl+1. This will open format cell dialogue box with number tab active.

From the list on left select date and on the right you will get several options as show below:

date format 1

As you can see, it can suffice most of the needs of most of the users. But definitely not everyone. For example, What if you want the dates to show up like this:

September (09) 22 (Thursday), 2011

In this case predefined formats are not going to help. But we can still do it if we really know how to harness the power of Customer formatting in Excel. And this is exactly what this article is about.

Custom Date Formats with Customer Formatting

Write the the following date in any cell:

08/06/1986

Having the cell containing date selected hit Ctrl+1 to open the same format cell dialogue box. But this time from the left select custom. Now in the type field you can punch in any of the following codes and pay attention how it is affecting the results. You can see the effect on run time basis just above the type field also. Following animation shows:

date format 3

I have summarized how each of the code affects the date and what it shows. Have a a look at the following table:

Date Format code Result Description
8/6/1986 d 6 Just the day with no leading zero
8/6/1986 dd 06 Just the day with leading zero
8/6/1986 ddd Wed Day in short words
8/6/1986 dddd Wednesday Day in full words
8/6/1986 m 8 Just the month with no leading zero
8/6/1986 mm 08 Just the month with leading zero
8/6/1986 mmm Aug Month in short words
8/6/1986 mmmm August Month in full words
8/6/1986 yy 86 Just the year with no leading century
8/6/1986 yyyy 1986 Just the year with leading century

Once we understand how each of them works, we can workout our own formats the way we want. Just toss them up with dashes or obliques or periods or just the way you want. But lets try the one we wanted in the beginning which was:  September (09) 22 (Monday), 2014

Just insert this date in the desired cell and give the following format code:

mmmm (mm) dd (dddd), yyyy

Bonus Tip 1: Showing Month Initials

While going through predefined date formats, I saw a date format which was odd and was like this:

S-11

Later I found that you can show months as initials as well. For example the month of September can be displayed as “S” only. And for this you need to put the following code:

mmmmm

Yes five times m in the format code. And this is only for the month as I so far know and does not work for Days or Years portion of the date.

Bonus Tip 2: WHAT THE ####!

Just in case you format the date and you get this:

######

Then don’t worry you just have to expand the column to display it properly. Basically the column width is too tight to display the date with format selected that is why it resulted in hash-tags.

date format 2

More Examples

Following are some of the combinations I made using the above codes:

Original format Code Desired format
8/6/1986 mmmm dd, yyyy August 06, 1986
8/6/1986 “[“mmm”]” dd – yyyy [Aug] 06 – 1986
8/6/1986 mm (dd) yy 08 (06) 86
8/6/1986 mmm, dddd, yy Aug, Wednesday, 86
8/6/1986 d-mmm 6-Aug
8/6/1986 dd/mm/yyyy 06/08/1986

So today we learnt how to have a perfect date with dates!

If you like this tutorial then don’t forget to checkout the following tutorials as well:

  1. Using Excel Custom Number Formatting as Data Validation Tool
  2. Custom Data Labels with Colors and Symbols in Excel Charts – [How To]
  3. Dealing with Telephone numbers in Excel – Dialing in the correct format
  4. Formatting Numbers in Excel – Conditional Formatting Vs Custom Number Formatting
  5. Changing numbers Sign in Excel – From Negative to Positive and Vice versa

LEAVE A REPLY