Special characters in custom date formats

NormThib

New Member
Joined
Apr 24, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I see some custom date codes in my spreadsheet include special characters. I have found some excellent documentation on special date and number formatting on the web, but I have not not been able to find any info on these special characters. I'd like to know what they mean and how/when to use them. Can you help? Here are some of the custom date formats I see with special characters:
m/d/yy;@
[$-en-US]dddd, mmmm d, yyyy
_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)
The above use the following special characters:
;@
[$-en-US]
_($*
_);_
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I have found some excellent documentation on special date and number formatting
It couldn't have been that good if it didn't cover some of the basics that you're asking about.

; separates the four sections of the format (positive numbers, negative numbers, zero values, text)

@ signifies text

[$-en-US] signifies default formatting based on regional settings, so dates will appear as M/D/Y in the US and D/M/Y in the UK.

* pads the cell (by repeating the space after the * as many times as needed) so that the $ symbol is set to the left side, with the amount to the right. Without the * the $ symbol would be next to the amount.

_ is for inserting a space into the format. I believe that this inserts a space that is slightly wider than normal for alignment purposes, but I have never had cause to look at this in detail.

The parenthesis are not in any of the default UK formats (or not that I have found), they appear to be used to preserve other parts of the formatting as necessary. Attempting to remove any of them from the format causes some strange results or rejection of the format as invalid.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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