Using a Two-Character Day of the Week in a Date Format

Written by Allen Wyatt (last updated August 3, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


5

Raymond's work requires that he format dates so they show in what he believes is a rather odd format. If, for instance, a cell contains a date of 10/20/19, he needs it to display as "SU 10/20", without the quotes. (SU is a two-character representation of the day of the week, in this case Sunday.) Raymond wonders if there is a way to do this as, perhaps, a custom format.

There is no way to do this exactly using a custom format. The reason is that there is no code in custom formats that allow you to create a two-character day of the week. The closest that could be done in a custom format is for a three-character day of the week:

ddd m/d

Even that, though, is a bit off because it won't do the three-character day of the week in uppercase.

So, that leads us to using a formula to come up with the formatted date. If you have the date in cell A1, you could use the following formula:

=LEFT(UPPER(TEXT(A1,"ddd")), 2) & " " & TEXT(A1,"m/d")

This uses the TEXT function to return, first, the three-character day of the week which is converted to uppercase using the UPPER formula. The LEFT function is then used to grab the first two characters of that weekday which is then added to the month/day combination. This returns exactly what Raymond wanted.

The downside to using this approach is that the date returned by the formula is text; it is not an actual date. If we had been able to use a custom format, the underlying date value would have been unchanged. This, though, would be the case for any odd date formatting like this. Because of this potential downside, you may want to retain the actual dates as dates, even if it is in a hidden column or a hidden worksheet.

You could also, if desired, create a macro that would return a string with the formatted date. Here's a simple user-defined function:

Function FmtDate(d As Date) As String
    Dim s As String

    s = UCase(Left(WeekdayName(Weekday(d)), 2))
    s = s & " " & Format(d, "m/d")
    FmtDate = s
End Sub

You can then use the function in the following way in your worksheet:

=FmtDate(A1)

This assumes the date is in A1, and the function returns a date string formatted as Raymond desires.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13704) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Sorting Data Containing Merged Cells

When formatting the layout of your worksheet, Excel allows you to easily merge adjacent cells together. This can cause ...

Discover More

Stepping Through a Non-Contiguous Range of Cells

Using macros to step through each cell in a selection is a common occurrence. What if that selected range is made up of ...

Discover More

Using Find and Replace to Find Conditionally Formatted Cells

You can use Find and Replace as a quick way to count any number of matches in your document. You cannot, however, use it ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Calculating Differences in Months using Non-Standard Date Values

Dates can be entered into a worksheet in any number of unique or novel ways. Working with those dates can be a challenge, ...

Discover More

Changing How Excel Determines which Year to Use

When you enter a date into a cell and you omit the year, Excel helpfully adds the current year to the date. If you want ...

Discover More

Days Left in the Year

Sometimes it is handy to know how many days are left in the current year. This tip provides a quick formula that ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2021-04-16 10:42:33

J. Woolley

@Kat
Windows 10 Settings > Time & Language > Region > Change data formats


2021-04-15 13:05:56

Kat

I need to format my dates as April 15, 2021. Before upgrade, that was the 'long date'. The short date was 4/15/21. Now the long is the same as the short date. Is there a way to change this. It's a big thing to me.

Katherine


2019-11-25 16:53:45

Yvan Loranger

How about =choose(weekday(a1),"SU","MO","TU","WE","TH","FR","SA")&" "&month(a1)&"/"&day(a1)


2019-11-23 08:05:09

Willy Vanhaelen

@Joe: elegant solution!

For who prefers to work with the UDF, here is a one-liner version :

Function FmtDate(d As Date) As String
FmtDate=UCase(Left(WeekdayName(Weekday(d)),2))&" "&Format(d,"mm/dd")
End Function

It ends with a End Function istead of End Sub in this tip which of cource causes an error. This also proves that the function was not even tested.


2019-11-23 06:36:42

Joe

You can use several conditional formatting rules to achieve this and still keep the cell value as a date. Set up 7 conditional formatting formulae

'=WEEKDAY(A1,2)=1' through to '=WEEKDAY(A1,2)=7'

and set a custom number format for each to

'"Mo " dd/mm' through to '"Su " dd/mm' (or '"Mo " mm/dd' etc for American style dates).

Apply this to all relevant cells and the cells stay as dates, but display as required.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.