Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
Use Excel’s DATE function when you need to take three separate values and combine them to form a date.
The DATE function returns the sequential serial number that represents a particular date.
Syntax: DATE(year,month,day)
The DATE function syntax has the following arguments:
-
Year Required. The value of the year argument can include one to four digits. Excel interprets the year argument according to the date system your computer is using. By default, Microsoft Excel for Windows uses the 1900 date system, which means the first date is January 1, 1900.
Tip: Use four digits for the year argument to prevent unwanted results. For example, «07» could mean «1907» or «2007.» Four digit years prevent confusion.
-
If year is between 0 (zero) and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE(108,1,2) returns January 2, 2008 (1900+108).
-
If year is between 1900 and 9999 (inclusive), Excel uses that value as the year. For example, DATE(2008,1,2) returns January 2, 2008.
-
If year is less than 0 or is 10000 or greater, Excel returns the #NUM! error value.
-
-
Month Required. A positive or negative integer representing the month of the year from 1 to 12 (January to December).
-
If month is greater than 12, month adds that number of months to the first month in the year specified. For example, DATE(2008,14,2) returns the serial number representing February 2, 2009.
-
If month is less than 1, month subtracts the magnitude of that number of months, plus 1, from the first month in the year specified. For example, DATE(2008,-3,2) returns the serial number representing September 2, 2007.
-
-
Day Required. A positive or negative integer representing the day of the month from 1 to 31.
-
If day is greater than the number of days in the month specified, day adds that number of days to the first day in the month. For example, DATE(2008,1,35) returns the serial number representing February 4, 2008.
-
If day is less than 1, day subtracts the magnitude that number of days, plus one, from the first day of the month specified. For example, DATE(2008,1,-15) returns the serial number representing December 16, 2007.
-
Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900. You will need to change the number format (Format Cells) in order to display a proper date.
Syntax: DATE(year,month,day)
For example: =DATE(C2,A2,B2) combines the year from cell C2, the month from cell A2, and the day from cell B2 and puts them into one cell as a date. The example below shows the final result in cell D2.
Need to insert dates without a formula? No problem. You can insert the current date and time in a cell, or you can insert a date that gets updated. You can also fill data automatically in worksheet cells.
-
Right-click the cell(s) you want to change. On a Mac, Ctrl-click the cells.
-
On the Home tab click Format > Format Cells or press Ctrl+1 (Command+1 on a Mac).
-
3. Choose the Locale (location) and Date format you want.
-
For more information on formatting dates, see Format a date the way you want.
You can use the DATE function to create a date that is based on another cell’s date. For example, you can use the YEAR, MONTH, and DAY functions to create an anniversary date that’s based on another cell. Let’s say an employee’s first day at work is 10/1/2016; the DATE function can be used to establish his fifth year anniversary date:
-
The DATE function creates a date.
=DATE(YEAR(C2)+5,MONTH(C2),DAY(C2))
-
The YEAR function looks at cell C2 and extracts «2012».
-
Then, «+5» adds 5 years, and establishes «2017» as the anniversary year in cell D2.
-
The MONTH function extracts the «3» from C2. This establishes «3» as the month in cell D2.
-
The DAY function extracts «14» from C2. This establishes «14» as the day in cell D2.
If you open a file that came from another program, Excel will try to recognize dates within the data. But sometimes the dates aren’t recognizable. This is may be because the numbers don’t resemble a typical date, or because the data is formatted as text. If this is the case, you can use the DATE function to convert the information into dates. For example, in the following illustration, cell C2 contains a date that is in the format: YYYYMMDD. It is also formatted as text. To convert it into a date, the DATE function was used in conjunction with the LEFT, MID, and RIGHT functions.
-
The DATE function creates a date.
=DATE(LEFT(C2,4),MID(C2,5,2),RIGHT(C2,2))
-
The LEFT function looks at cell C2 and takes the first 4 characters from the left. This establishes “2014” as the year of the converted date in cell D2.
-
The MID function looks at cell C2. It starts at the 5th character, and then takes 2 characters to the right. This establishes “03” as the month of the converted date in cell D2. Because the formatting of D2 set to Date, the “0” isn’t included in the final result.
-
The RIGHT function looks at cell C2 and takes the first 2 characters starting from the very right and moving left. This establishes “14” as the day of the date in D2.
To increase or decrease a date by a certain number of days, simply add or subtract the number of days to the value or cell reference containing the date.
In the example below, cell A5 contains the date that we want to increase and decrease by 7 days (the value in C5).
See Also
Add or subtract dates
Insert the current date and time in a cell
Fill data automatically in worksheet cells
YEAR function
MONTH function
DAY function
TODAY function
DATEVALUE function
Date and time functions (reference)
All Excel functions (by category)
All Excel functions (alphabetical)
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Bottom line: Learn a few different ways to return the name of the day or weekday name for cell that contains a date value.
Skill level: Beginner
In this post we will look at a few different ways to return the day name for a date in Excel. This can be very useful for creating summary reports, pivot tables, and charts.
Method #1: The Number Format Drop-down Menu
Often times you have a date in a cell and you just want to know the name of the day for the date. The easiest way to see the weekday name is to select the cell, then press the Number Format Drop-down menu button on the Home tab of the Ribbon.
The Long Date format shows a preview of the date and includes the name of the day for the date in the selected cell.
The keyboard shortcut for the Number Format Drop-down menu is: Alt,H,N,Down Arrow
Checkout my article on how the date system works in Excel to learn more about dates.
Method #2: The Format Cells Dialog Window
We can also see the Long Date format in the Format Cells Window on the Number tab.
This window can be opened by right-clicking the cell, then pressing Format Cells…
The keyboard shortcut for the Format Cells Window is: Ctrl+1
Click on the Long Date format and the Sample box will show a preview that includes the day of the week.
You can also apply a Custom number format to just display the weekday name in the cell.
- Click the Custom category in the Format Cells window.
- Input one of the following formats in the Type box:
- ddd – Returns first three letters of day name (Mon, Tue, Wed, etc.)
- dddd – Returns full name of the day (Monday, Tuesday, Wednesday, etc.)
- Press OK and the cell’s number format will be changed to display the day of the week.
The cell value will still contain the date, but the name of the day will be displayed instead of the date.
Method #3: Use the TEXT Function
The TEXT function is really handy for converting dates to different text formats. This is great for adding fields to the source data of a pivot table. It can be used as an alternative to the Date Grouping feature of a pivot table.
The TEXT function contains two arguments.
=TEXT( value, format_text)
- value – The value is a number or date. In this case we will reference the cell that contains the date.
- format_text – This the the number format that we want to apply to the value. The number format should be wrapped in quotes. “ddd”
The image below shows that the formula will return the day name of the given date.
My friend Dave Bruns at ExcelJet has a great article that explains how to use the TEXT function for weekday names in more detail.
Use the Weekday Name in the Source Data of a Pivot Table
We can then use this technique to add a column to your pivot table source data for the day name. This basically allows us to group dates by the day of the week.
The example below shows how I used this technique to analyze the sales trend by the day of the week. With a pivot table you could quickly create a chart or report that shows the total or average sales by weekday for a given period.
We could also add a slicer with the day name to filter the pivot table or chart. This would be similar to the technique I explained in the video on how to group days for MTD comparisons.
Checkout my free video series on pivot tables and dashboards to learn more about these great tools in Excel.
What Do You Use the Name of Day For?
Well, there are a few quick tips for getting the name of the day for a date. Do you have any other ways to get the weekday name?
Please leave a comment below with any questions or suggestions. Thanks!
In this example, the goal is to get the day name (i.e. Monday, Tuesday, Wednesday, etc.) from a given date. There are several ways to go about this in Excel, depending on your needs. This article explains three approaches:
- Display date with a custom number format
- Convert date to day name with TEXT function
- Convert date to day name with CHOOSE function
For all examples, keep in mind that Excel dates are large serial numbers, displayed as dates with number formatting.
Day name with custom number format
To display a date using only the day name, you don’t need a formula; you can just use a custom number format. Select the date, and use the shortcut Control + 1 to open Format cells. Then select Number > Custom, and enter one of these custom formats:
"ddd" // i.e."Wed"
"dddd" // i.e."Wednesday"
Excel will display only the day name, but it will leave the date intact. If you want to display both the date and the day name in different columns, one option is to use a formula to pick up a date from another cell, and change the number format to show only the day name. For example, in the worksheet shown, cell F5 contains the date January 1, 2000. The formula in G5, copied down, is:
=F5 // get date from F5
Cells G5 and G6 have the number format «dddd» applied, and cells in G7:G9 have the number format «ddd» applied.
Day name with TEXT function
To convert a date to a text value like «Saturday», you can use the TEXT function. The TEXT function is a general function that can be used to convert numbers of all kinds into text values with formatting, including date formats. For example, with the date January 1, 2000 in cell A1, you can use TEXT like this:
=TEXT(A1,"d-mmm-yyyy") // returns "1-Jan-2000"
=TEXT(A1,"mmmm d, yyyy") // returns "January 1, 2000"
=TEXT(A1,"mmmm") // returns "January"
In the worksheet shown, the goal is to display the day name only, so we use a custom number format like «ddd» or «dddd»:
=TEXT(B5,"dddd") // returns "Saturday"
=TEXT(B5,"ddd") // returns "Sat"
Note: The TEXT function converts a date to a text value using the supplied number format. The date is lost in the conversion and only the text for the day name remains.
Day name with CHOOSE function
For maximum flexibility, you can create your own day names with the CHOOSE function. CHOOSE is a general-purpose function for returning a value based on a numeric index. For example, you can use CHOOSE to return one of three colors with a number like this:
=CHOOSE(1,"red","blue","green") // returns "red"
=CHOOSE(2,"red","blue","green") // returns "blue"
=CHOOSE(3,"red","blue","green") // returns "green"
In this example, the goal is to return a day name from a date, so we need to configure CHOOSE to select one of seven-day names. For example, the formula below would return «Wed» based on a numeric index of 4:
=CHOOSE(4,"Sun","Mon","Tue","Wed","Thu","Fri","Sat") // "Wed"
The challenge in this case is to get the right index for a date and for that we need the WEEKDAY function. For any given date, WEEKDAY returns a number between 1-7, which corresponds to the day of the week. By default, WEEKDAY returns 1 for Sunday, 2 for Monday, 3 for Tuesday, etc. In the worksheet shown, the formula in C12 is:
=CHOOSE(WEEKDAY(B12),"Sun","Mon","Tue","Wed","Thu","Fri","Sat")
WEEKDAY returns a number between 1-7, and CHOOSE will use this number to select the corresponding value in the list. Since the date in B12 is January 1, 2000, WEEKDAY returns 7, and CHOOSE returns «Sat».
CHOOSE is more work to set up, but it is also more flexible, since it allows you to convert a date to a day name using any values you want. For example, you can use custom abbreviations or even abbreviations in a different language. In cell C15, CHOOSE is set up to use one letter abbreviations that correspond to Spanish day names:
=CHOOSE(WEEKDAY(B15),"D","L","M","X","J","V","S")
Empty cells
If you use the formulas above on an empty cell, you’ll get «Saturday» as the result. This happens because an empty cell is evaluated as zero, and zero in the Excel date system is the date «0-Jan-1900», which is a Saturday. To work around this issue, you can use the IF function to return an empty string («») for empty cells. For example, if cell A1 may or may not contain a date, you can use IF like this:
=IF(A1<>"",TEXT(A1,"ddd"),"") // check for empty cells
The literal translation of this formula is: If A1 is not empty, return the TEXT formula, otherwise return an empty string («»).
When working with date-specific information, there might be instances where you need to find the day of the week corresponding to a date.
For example, instead of the date, you may want to know whether it’s a Monday or a Tuesday or any other day.
This could be useful when working with to-do lists, daily/weekly summary reports, etc.
In this tutorial, we will see three different ways of converting dates to the corresponding day of the week in Excel.
For all the three methods in this tutorial, we will be using the following sample dataset.
We will convert all the dates in the above sample dataset into corresponding days of the week.
Method 1: Converting Date to Day of Week in Excel using the TEXT Function
The TEXT function is a great function to convert dates to different text formats.
It takes a date serial number or date and lets you extract parts of the date to fit your required format.
Here’s the syntax for the TEXT function:
= TEXT (date, date_format_code)
In this function,
- date is the date, date serial number, or reference to the cell that you want to convert.
- date_format_code is the format code based on how you want the converted date to look.
The TEXT function applies the date_format_code that you specified on the provided date and returns a text string with that format.
For example, if you have the date “2/10/2018” in cell A2, then =TEXT(A2,”dddd”) will return “Saturday”.
Here, “dddd” is the date_format code to display the day of the week corresponding to date in full words.
Here are some basic building blocks for the format codes that you can use:
Format Codes for Day of the Week or Month:
You can use the following basic format codes to represent day values:
- d – one or two-digit representation of the day (eg: 3 or 30)
- dd – two-digit representation of the day (eg: 03 or 30)
- ddd – the day of the week in abbreviated form (eg: Sun, Mon)
- dddd – full name of the day of the week (eg: Sunday, Monday)
So,
- if you apply =TEXT(A2, “d”) to the sample dataset, it will return “10”.
- if you apply =TEXT(A2, “dd”), then it will return “10”.
- if you apply =TEXT(A2, “ddd”) to the sample dataset, it will return “Sat”.
- if you apply =TEXT(A2, “dddd”), then it will return “Saturday”.
Let us see how we can apply the TEXT function to our sample dataset to convert all the dates to days of the week.
We will first see how to convert the dates in column A to the format shown in column B in the image below:
Below are the steps to convert the date to a weekday name using the TEXT function:
- Click on a blank cell where you want the day of the week to be displayed (B2)
- Type the formula: =TEXT(A2,”ddd”) if you want the shortened version of the day or =TEXT(A2,”dddd”) if you want the full version of the day.
- Press the Return key.
- This should display the day of the week in our required format. Copy this to the rest of the cells in the column by dragging down the fill handle or double-clicking on it.
- Copy this column’s formula results by pressing CTRL+C or Cmd+C (if you’re on a Mac).
- Right-click on the column, and from the popup menu that appears, press Paste Values from the Paste Options.
- This will store the formula results as permanent values in the same column. Now you can go ahead and remove column A if you want to.
You should see all the dates converted to the short form of their corresponding days of the week:
The result you get in column B will differ according to the format code you used in step 2. Here are some format codes along with the type of result you will get when applied to cell A2:
Function | Result |
=TEXT(A2, “ddd”) | Sat |
=TEXT(A2, “dddd”) | Saturday |
Note: Using this formula, your converted date is in text format, so you will see the results aligned to the left side of the cells.
Also read: How to Convert Date to Serial Number in Excel?
Method 2: Converting Date to Day of Week in Excel using the Format Cells Feature
The Format Cells feature provides a great way to directly convert your dates to days of the week while replacing the existing dates. As such you don’t need to have a separate column to type the formula.
You can use the Format Cells dialog box to convert your dates to days of the week as follows:
- Select all the cells containing the dates that you want to convert (A2:A8).
- Right-click on your selection and select Format Cells from the popup menu that appears. Alternatively, you can select the dialog box launcher in the Number group under the Home tab.
- This will open the Format Cells dialog box. Click on the Number tab
- Under Category on the left side of the box, select the Custom option.
- This will display a number of formatting options on the right side, under Type. You can type in your format code in the Type field. You can type in “ddd” if you want the short form or “dddd” if you want the full form of the day.
- Click OK to close the Format Cells dialog box.
All your selected cells should now appear as weekday names.
Note: By using Format Cells, you have just changed the format in which the dates are displayed in the cells. The actual dates are underlying the cells and can be seen in the formula bar when a cell is selected.
Also read: How to Convert Text to Date in Excel?
Method 3: Converting Date to Day of Week in Excel using a Formula
If you’d rather use your own representation for the days of the week, you can use a formula based on both the WEEKDAY and CHOOSE functions.
First, let us understand these two functions individually.
The WEEKDAY Function
The WEEKDAY function converts a date to a number between 1 and 7, one for each day of the week. It chooses the sequencing of these numbers based on the day we want the week to begin from.
This is helpful because in some countries, the week starts from Sunday, while in others, especially Middle Eastern countries, the week starts from Saturday.
The syntax for the WEEKDAY function is:
WEEKDAY(date, [type])
Here,
- date is the input date for the function. It can be a date, a date serial number, or a reference to a cell that holds a date value.
- type is an optional parameter. It tells the function where to begin the week from. So, if we put a 1, it means the week should start from Sunday and end on Saturday. If we put a 2, it means the week should start from Monday and end on Sunday, and so on. By default, the value for the type parameter is set to 1.
In our example, WEEKDAY(A2, 1) will return 7, corresponding to a Saturday.
The CHOOSE Function
The CHOOSE function lets you specify a particular outcome depending on a value. For example, you can choose to display the word “red” if a value is 1, “blue” if it is 2, “green” if it is 3, and so on.
In this way it’s a great alternative to using a bunch of nested IF functions.
The syntax for the CHOOSE function is:
=CHOOSE (index, value1, [value2], ...)
Here,
- index is the input value. It can be any number between 1 and 254.
- value1 is the first value from the list of possible outputs
- value2 is the second value from the list of possible outputs,
etc.
The function returns value1 if index is 1, value2 if index is 2, etc.
So the function: =CHOOSE(3, “sun”,”mon”,”tue”,”wed”,”thu”,”fri”, ”sat”) will return “tue”, because it’s the third value in the list.
Putting the Formula Together
Let us put the two functions CHOOSE and WEEKDAY together to convert date to day of the week. Here are the steps to follow:
- Click on a blank cell where you want the day of the week to be displayed (B2)
- Type the formula: =CHOOSE(WEEKDAY(A2),”Sun”,”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”)
- Press the Return key.
- This should display the day of the week in short form, corresponding to the date in A2. Copy this to the rest of the cells in the column by dragging down the fill handle or double-clicking on it.
- Copy this column’s formula results by pressing CTRL+C or Cmd+C (if you’re on a Mac).
- Right-click on the column and form the popup menu that appears, press Paste Values from the Paste Options.
- This will store the formula results as permanent values in the same column. Now you can go ahead and remove column A if you want to.
Here’s what you should get as the result:
How did this Formula Work?
To understand how this formula worked, we need to break it down:
- First, we used the WEEKDAY function to find the number corresponding to the day of the week, assuming our week starts from Sunday. This will return a number between 1 and 7.
- We used the output of the WEEKDAY function to find the string from the list of days [“sun”,”mon”,”tue”,”wed”,”thu”,”fri”, “sat”] corresponding to that number. So if the output for WEEKDAY(A2) was 7, then the corresponding output for the CHOOSE function will be the seventh item in the list, which is “sat”.
Thus we get the day corresponding to the date in A2 (in our example) to be “sat”.
Note: The above formula will give your converted date in text format, so you will see the results aligned to the left side of the cells.
You could also have any other format for the days in the list, for example, if you wanted to display just the first two letters for the days, you could have written the formula in step 2 as:
=CHOOSE(WEEKDAY(A2),"Su","Mo","Tu","We","Th","Fr","Sa")
So you could get an output as:
If you wanted to make a to-do list, you could even have an activity for each day of the week. For example, you could use the formula:
=CHOOSE(WEEKDAY(A2),"cycling","rollerblading","swimming","skiing","art","crafts","free time")
So you could get an output as:
In this tutorial, we saw three ways to convert a date to the day of the week.
The first method involves a function (TEXT), the second method involves a commonly used Excel dialog box (Format Cells) and the third method involves an Excel formula (with WEEKDAY and CHOOSE functions).
We hope you found this tutorial helpful and easy to apply to your data.
Other Excel tutorials you may find useful:
- How to Convert Serial Numbers to Date in Excel
- How to Convert Date to Month and Year in Excel
- How to Get Total Days in Month in Excel?
- How to Add Days to a Date in Excel
- How to Sort by Date in Excel (Single Column & Multiple Columns)
- Why are Dates Shown as Hashtags in Excel?
- How to Convert Month Number to Month Name in Excel
- How to Convert Days to Years in Excel (Simple Formulas)
- How to Get the First Day Of The Month In Excel?
Excel spreadsheets provide the ability to work with various types of textual and numerical information. Date processing is also available. In this case, there may be a need to extract from the general meaning of a specific number, for example, a year. There are separate functions for this: YEAR, MONTH, DAY and DAY.
Examples of using functions for date processing in Excel
Excel tables store dates that are presented as a sequence of numeric values. It begins on January 1, 1900. This date will correspond to the number 1. At the same time, January 1, 2009 is laid down in the tables, as the number 39813. This is the number of days between the two designated dates.
The function YEAR is used similarly to the adjacent:
- MONTH;
- DAY;
- WEEKDAY.
All of them display numerical values corresponding to the Gregorian calendar. Even if in the Excel spreadsheet, the Hijra calendar was chosen to display the entered date, then when isolating the year and other composite values by functions, the application will present a number that is equivalent to the Gregorian system of chronology.
To use the YEAR function, you need to enter into the cell the following function formula with one argument:
=YEAR(cell address with date in numeric format)
The function argument is required. It can be replaced by «date_number_number». In the examples below, you can clearly see this. It is important to remember that when displaying the date as text (automatic orientation on the left edge of the cell), the YEAR function will not be executed. Its result will be the # SIGN. Therefore, formatted dates must be presented in a numerical version. Days, months and year can be separated by a dot, slash or comma.
Consider an example of working with the YEAR function in Excel. If we need to get a year from the original date, the function AVAILABLE will not help us since it does not work with dates, but only with text and numeric values. To separate the year, month or day from the full date for this, Excel provides functions for working with dates.
Example: There is a table with a list of dates and in each of them it is necessary to separate the value of only the year.
We introduce the original data in Excel.
To solve the problem, it is necessary to enter the formula in the cells of column B:
=YEAR(the address of the cell, from the date of which you need to isolate the year value)
As a result, we extract years from each date.
A similar example of the MONTH function in Excel:
An example of working with functions DAY and WEEKDAY. The DAY function gets to calculate from the date the number of any day:
WEEKDAY function returns the number of the day of the week (1-Monday, 2-Tuesday …, etc.) for any date:
In the second optional argument of the WEEKDAY function, the number 2 may specified for our day of the week countdown format (Monday-1 through Sunday-7):
If you omit the second optional argument, then the default format will be used (English from Sunday-1 to Saturday-7).
Create a formula of the combination of the functions INDEX and WEEKDAY:
We obtain a more understandable form of the implementation of this function.
Examples of the practical use of functions for working with dates
These primitive functions are very useful when grouping data by: years, months, days of the week, and specific days.
Suppose we have a simple sales report:
We need to quickly organize data for visual analysis without using pivot tables. To do this, we will bring the report into a table where it is convenient and quickly to group data by year, month and day of the week:
Now we have a tool to work with this sales report. We can filter and segment data by specific time criteria:
In addition, you can make a histogram to analyze the best-selling days of the week, to understand which day of the week has the largest number of sales:
In this form, it is very convenient to segment sales reports for long, medium and short periods of time.
It should be immediately noted that in order to get the difference between the two dates, none of the above functions will help us. For this task, you should use a specially designed function DATEDIF:
Download examples fo functions YEAR MONTH DAY WEEKDAY and DATEDIF
The type of values in the date cells requires a special approach to data processing. Therefore, you should use the appropriate type of function in Excel.
Any date in Excel can be converted to its corresponding day name by customizing the display, or by using the TEXT, CHOOSE and WEEKDAY functions. This step by step tutorial will assist all levels of Excel users in getting day name from date using three different methods.
Figure 1. Final result: Get day name from date
Formula 1: =TEXT(B3,"ddd")
Formula 2: =TEXT(B4,"dddd")
Formula 3: =CHOOSE(WEEKDAY(B5),"Su","M","T","W","Th","F","Sa")
Syntax of TEXT Function
TEXT converts a number into text
=TEXT(value, format_text)
- value – any numeric value, a formula or cell reference to a numeric value
- format_text – a numeric format expressed as a text string and enclosed in quotation marks
- “ddd” displays the day as an abbreviation from Sun to Sat
- “dddd” displays the day as a full name from Sunday to Saturday
Syntax of CHOOSE Function
CHOOSE function returns a value from a list of values based on the index_num provided
=CHOOSE(index_num, value1, [value2], ...)
- index_num – determines which value in the list of values is returned by the CHOOSE function
- Index_num must be a number between 1 and 254, or a cell reference with values between 1 and 254
- Value1 is returned if index_num is 1, values2 if index_num is 2; and so on
- CHOOSE returns the error #VALUE! if index_num is less than 1 or greater than the number of the last value in the list
- value1, value2, … the values in the list that the function chooses from; Only value 1 is required, succeeding values are optional
Syntax of WEEKDAY Function
WEEKDAY returns the day of the week of the given date; returns an integer ranging from 1 to 7, where by default, 1 means Sunday and 7 means Saturday
=WEEKDAY(serial_number,[return_type])
- serial_number – the date for which we want to find the corresponding day of the week
- return_type – Optional; determines the type of return value; see below table for the options
Figure 2. WEEKDAY function return_type options
Setting up our Data
Our table contains two columns: Date (column B) and Day Name (column C). We want to determine the name of the day corresponding to the date “1/23/2019” by using three different methods. The results will be recorded in column D.
Figure 3. Sample data to get day name from date
Get day name from date using TEXT function
One way to get the day name from a date is by using the TEXT function. This method converts the date into a text string representing the day name of the given date. Let us follow these steps:
Step 1. Select cell C3
Step 2. Enter the formula: =
TEXT(B3,"ddd")
Step 3. Select cell C4
Step 4. Enter the formula:=
TEXT(B4,"dddd")
Step 5. Press ENTER
Figure 4. Entering the formula to get day name in “ddd” format using TEXT
The formulas in C3 and C4 both use the TEXT function but with different format. Our date, “1/23/2019” falls on a Wednesday.
In cell C3, the day of the week is represented as an abbreviation in three letters, “Wed”, which corresponds to the format “ddd”. On the other hand, C4 returns the day of the week in full name through the use of the format”dddd”. Hence, the value in C4 is “Wednesday”.
Figure 5. TEXT function returns day name in “dddd” format
Get day name from date using CHOOSE and WEEKDAY functions
Another way to get the day name from a date is by using a combination of the CHOOSE and WEEKDAY functions. Through this method, we can customize the day name that we want to show. Let us follow these steps:
Step 1. Select cell C5
Step 2. Enter the formula: =
CHOOSE(WEEKDAY(B5),"Su","M","T","W","Th","F","Sa")
Step 3. Press ENTER
In this example, we customize the day name by setting up the values in the list within our formula: “Su“,”M“,”T“,”W“,”Th“,”F“,”Sa“.
Figure 6. CHOOSE and WEEKDAY functions return day name in custom format “W”
Our formula has two parts. First, it determines the day of the week corresponding to our date using the WEEKDAY function. Then it chooses a value from the list based on the index number given by the WEEKDAY function.
The date “1/23/2019”, as we already know, falls on a Wednesday. The WEEKDAY function returns the value of “4”, since by default, the value for Wednesday is 4. We can refer back to Figure 2 above for the WEEKDAY function return_type options.
Finally, the CHOOSE function goes through the list and returns the fourth value, which is “W”, as shown in Figure 6.
Display the day name only
Any date in Excel can be formatted to show the day name by simply changing the format. This example will show us how to customize the display of a date to show only the day name. Let us follow these steps:
Step 1. Select cell C3
Step 2. Press Ctrl + 1 to show the Format Cells dialog box
Step 3. Select the Custom category
Step 4. Enter “ddd” into the Type: box
Step 5. Press Enter
Figure 7. Display day name only using the custom format”ddd”
The resulting display in cell B3 is “Wed”, an abbreviation for Wednesday and follows the format “ddd”. Note that customizing the format doesn’t change the value of the cell. As shown below, the value of cell B3 remains the same, “1/23/2019”.
Figure 8. Date displayed in custom format”ddd”
In the same manner, we can format cell B4 and enter the custom format type “dddd”.
Figure 9. Display day name only using the custom format”dddd”
As a result, cell B4 displays the full day name of “Wednesday”, without changing the value of the cell.
Figure 10. Date displayed in custom format”dddd”
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.
What day of the week is 2019-11-14? Is it a Monday, Tuesday, Wednesday, etc…
It’s pretty common to want to know what day of the week a given date falls on and unless you’ve got some sort of gift for knowing that, you’re going to need a way to figure it out.
In Excel, there are many different ways to determine this. In this post, we’re going to explore 7 ways to achieve this task.
Format a Date as the Weekday Name
The first option we’re going to look at involves formatting our date cells.
Dates in Excel are really just serial numbers starting at 1 for the date 1900-01-01. Formatting is what makes the date look like a date.
There are many ways to format these serial numbers to display the date in various formats like yyyy-mm-dd, dd/mm/yyyy, dd-mmm-yy etc…
One of the possible formatting options for these serial numbers is to display the weekday name with a custom dddd or ddd format.
We can format our dates from the Format Cells dialog box.
- Select the dates which we want to convert into weekday names.
- Go to the Home tab and click on the small launch icon in the lower right corner of the Number section. This will open up the Format Cells dialog box. We can also open up the Format Cells dialog a few other ways.
- The keyboard shortcut Ctrl + 1.
- Right click on the selected cells ➜ choose Format Cells from the menu.
- Go to the Number tab in the Format Cells dialog box.
- Select Custom as the Category.
- Add dddd into the Type field for the full weekday name or ddd for the abbreviated weekday name.
- Press the OK button.
Now our dates will appear as the weekday names in the worksheet. The dates are still inside the cells and can be seen in the formula bar when a cell is selected.
Get the Weekday Name with the TEXT Function
The TEXT function will allow us to convert numbers to text and apply formatting to those numbers.
= TEXT ( 1234 , "$#,###" )
We can use the TEXT function to convert the number 1234 into the text string $1,234 with the above formula.
Since dates are really just serial numbers, we can use this function to convert any date into a text string with the weekday name format.
TEXT Syntax
= TEXT ( Value , Format )
- Value (required) is the value to convert to a text string.
- Format (required) is the formatting to apply when converting to a text string.
=TEXT ( B2, "dddd" )
The above formula will convert our date value in cell B2 into the corresponding weekday name. In this example we get a value of Friday from the date 2020-09-18.
Get the Weekday Number with the WEEKDAY Function
While the results aren’t quite as useful, there is also a WEEKDAY function in Excel.
This will convert a date into a corresponding number between 1 and 7 representing the weekday.
WEEKDAY Syntax
= WEEKDAY ( Date , [Type] )
- Date (required) the date to find the weekday number from.
- Type (optional) the weekday number type to return.
- Omitted or 1 returns 1 for Sunday through 7 for Saturday.
- 2 returns 1 for Monday through 7 for Sunday.
- 3 returns 0 for Monday through 6 for Sunday.
- 11 returns 1 for Monday through 7 for Sunday.
- 12 returns 1 for Tuesday through 7 for Monday.
- 13 returns 1 for Wednesday through 7 for Tuesday.
- 14 returns 1 for Thursday through 7 for Wednesday.
- 15 returns 1 for Friday through 7 for Thursday.
- 16 returns 1 for Saturday through 7 for Friday.
- 17 returns 1 for Sunday through 7 for Saturday.
= WEEKDAY ( B2, 1 )
The above formula will convert our date value in cell B2 into the corresponding weekday number. The second argument value of 1 will return a 1 for Sunday through to 7 for a Saturday. In this case 2019-09-18 returns a 6 because it’s a Friday.
Combining SWITCH with WEEKDAY to Return the Weekday Name
On its own, the WEEKDAY function can only return a number representing the weekday, but we can combine it with the SWITCH function to get the weekday name.
= SWITCH ( WEEKDAY ( B2, 1 ),
1, "Sun",
2, "Mon",
3, "Tue",
4, "Wed",
5, "Thu",
6, "Fri",
7, "Sat" )
The WEEKDAY function returns a number from 1 to 7 and we can then use the SWITCH function to assign a weekday name to each of these numbers.
Get the WEEKDAY Name Using Power Query
Power Query (also known as Get & Transform) is a powerful data wrangling tool available in Excel 2016 onward.
It makes any data transformation easy and it can get the name of the weekday too.
We first need to import our data into the power query editor. We need our data inside an Excel table.
- Select a cell inside the Excel table containing the dates.
- Go to the Data tab in the ribbon.
- Press the From Table/Range command in the Get & Transform Data section.
This will open up the power query editor.
We can now transform our dates into the name of the weekday.
- We need to make sure the column is converted to the date data type. Click on the icon in the left of the column heading and select Date from the options.
- With the date column selected, go to the Add Column tab.
- Select Date ➜ Day ➜ Name of Day.
= Table.AddColumn( #"Changed Type", "Day Name", each Date.DayOfWeekName( [Date] ), type text )
This will add a new column containing the weekday name and we can see the M code that’s generated in the power query formula bar. This uses the Date.DayOfWeekName power query function.
A similar command can be found in the Transform tab. The difference is, this will not add a new column, but rather transform the selected column.
Get the WEEKDAY Name in a Pivot Table with the WEEKDAY DAX Function
Did you know you can summarize text values with a pivot table?
Well, we can go a step further and summarize our dates as a list of weekday names inside our pivot table using a DAX measure!
We need to create a pivot table from our data.
- Select a cell inside the data.
- Go to the Insert tab in the ribbon.
- Press the PivotTable command.
- In the Create PivotTable menu check the option to Add this data to the Data Model and press the OK button.
This will create a new blank pivot table in the workbook and add the data into the data model. Adding the data to the data model will allow us to use the DAX formula language with our pivot table.
Now we can create a measure to convert our dates into names and summarize the results into a comma separated list.
- Select a cell inside the pivot table.
- Right click on the table in the PivotTable Fields window and select Add Measure from the menu options.
This will open up the DAX formula editor and we can create our DAX measure.
We can now add the following formula into the DAX formula editor.
= CONCATENATEX (
Activities,
SWITCH (
WEEKDAY ( Activities[Date], 1 ),
1, "Sun",
2, "Mon",
3, "Tue",
4, "Wed",
5, "Thu",
6, "Fri",
7, "Sat"
),
", "
)
- Give our new measure a name like Name of Days.
- Add the above DAX formula into the formula box.
To see the results of our DAX formula, all we need to do is add it into the Values area of our PivotTable Fields window.
This is very similar to the WEEKDAY function solution with Excel functions. The only difference is we need to aggregate the results with a CONCATENATEX function to display inside our pivot table.
Get the Weekday Name in a Pivot Table with the FORMAT DAX Function
Another DAX function we can use to get the weekday name is the FORMAT function. This is very similar to Excel’s TEXT function and will allow us to apply a custom format to our date values.
= CONCATENATEX ( Activities, FORMAT ( Activities[Date], "dddd" ), ", " )
The process is the exact same as the previous DAX example, but instead we create a measure with the above formula.
Get the Weekday Name with a Power Pivot Calculated Column
If you have the power pivot add-in for Excel, then you can use DAX to create a calculated column in the data model.
If our data isn’t already in the data model, we can easily add it by going to the Power Pivot tab in the ribbon ➜ selecting Add to Data Model.
Now we can open up the power pivot window by going to the Power Pivot tab ➜ selecting Manage Data Model.
= FORMAT ( Activities[Date], "dddd" )
Inside the power pivot window, we can add our new calculated column.
- Double click on the Add Column heading and give the new column a name like Weekday.
- Select a cell inside the new column and add the above DAX formula into the formula bar and press enter.
When we close the power pivot window, we now have the new Weekday field available to use in our pivot table and we can add it into the Rows, Columns or Filter area of the pivot table.
Conclusions
There are lots of options to get the name of the day from a date in Excel.
We covered formatting, Excel formulas, power query and DAX formulas in the data model.
There are probably a few more ways as well. Let me know in the comments if I missed your favourite method.
About the Author
John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.
When working with dates in Excel, sometimes you may want to know what day the date is (whether it’s a Monday or a Tuesday, or any other weekday).
This could especially be useful in project planning, where some days could be for a specific task (such as having a project meeting or sending the progress report), or where you need to know what days the working days are and what days are the weekends.
In this tutorial, I will show you a couple of ways you can use to convert dates into the day of the week and get its name in Excel.
So let’s get to it!
Get the Day Name Using Custom Number Formats
One of the best methods to convert a date into the day name is by changing the format of the cell that has the date.
The good thing about this method is that while you see the day name in the cell, in the back end, it still continues to be the date. This way, you can still use the dates in calculations.
Suppose you have a data set as shown below, where I have some dates in column A for which I want to know the name of the day.
Below are the steps to do this:
- Select the dates in column A
- Click the Home tab
- In the Number group, click on the dialog box launcher (the tilted arrow at the bottom right part of the group in the ribbon)
- In the Format Cells dialog box, click on the Custom category option
- In the Type field, enter dddd
- Click Ok
The above steps would convert the dates in the cells in column A and give you the name of the day for those dates.
And as I mentioned, doing, this would only change the way the dates are being displayed in the cells. In the back end, the cells still contain the dates that can be used in calculations.
When I use the custom code dddd, it tells Excel that I want to show only the day name from the date, and hide the month and the year value.
Below are the formats you can use when you working with dates in Excel:
- d – shows the day value from the date. If the day value is less than 10, only one digit is shown and if it’s 10 or more than 10, then two digits are shown.
- dd – shows the day value from the date in two digits. If the day value is less than 10, a leading zero is added to the number. For example, 5 would become 05
- ddd – this will show you the day name in the short format. If it’s Monday it would show you Mon, for Tuesday it will show Tue, and so on.
- dddd – when you use this custom format, it will show you the entire day name (such as Monday or Tuesday)
Note: For this method to work, you need to make sure that the dates are in a format that Excel understands as a date. For example, if you use Jan 21 2021, then it wouldn’t be converted into the day name as Excel doesn’t recognize this as a valid date format.
Get the Day Name Using TEXT Formula
You can also use the text formula in excel to convert a date into the name of the day.
However, unlike the above custom number format method, the result of the text formula would be a text string. This means that you would not be able to use the result of the text formula in calculations as a numeric or date value.
Let me show you how this method works.
Suppose I have a dates dataset as shown below and I want the name of the days in column B.
Below is the formula I can use to do this:
=TEXT(A2,"dddd")
The above formula will give you the full name of the day (such as Monday or Tuesday).
All the custom number formats that are covered in the above section can also be used in the text formula. Just make sure that the format is within double quotes (as the one shown in the formula above).
Now, you must be wondering why you would ever use the TEXT formula when the custom formatting method (covered before this method) gives you the same result and seems easier to use.
Let me show you in what situation using the TEXT formula to get day names can be useful.
Suppose I have the same data set as shown below, but now instead of getting the day name, I want to get an entire sentence where I have some text below or after the date name.
Let’s say I want to get the result as ‘Due Date – Monday’ (i.e., I want to add some text before the day name)
I can use the below formula to do this:
="Due Date: "&TEXT(A2,"dddd")
Or, another example could be where you want to show whether the day is Weekday or Weekend followed by the day name. This can be done using the below formula:
=IF(WEEKDAY(A2,2)>5,"Weekend: ","Weekday: ")&TEXT(A2,"dddd")
I’m sure you get the idea.
The benefit of using the TEXT formula is that you can combine the result of that formula with other formulas (such as IF function or AND/OR function).
Get the Day Name Using CHOOSE and WORKDAY formula
And lastly, let me show you how to get the denim using a combination of CHOOSE and WORKDAY formulas.
Below I have the data set where I have the dates in column A for which I want to get the day name.
Here is the formula that will do this:
=CHOOSE(WEEKDAY(A2,2),"Mon","Tue","Wed","Thu","Fri","Sat","Sun")
In the above formula, I have used the WEEKDAY formula to get the weekday number of any given date.
Since I’ve specified the second argument of the weekday formula as 2, it would give me 1 for Monday, 2 for Tuesday, and so on.
This value is then used within the CHOOSE formula to get the day name (which is something that I have already specified in the formula).
This is definitely bigger and more complex than the TEXT formula we used in the previous section.
But there is one scenario where using this formula can be useful – when you want to get something specific to that day instead of getting the day name.
For example, below is the same formula where I have changed the day name with specific activities that need to be done on those days.
=CHOOSE(WEEKDAY(A2,2),"Townhall","Proj Update Call","Buffer day","Support","Weekly Checkin","Weekend","Weekend")
In the above formula, instead of using the day names, I have used the name of the activities that need to be done on those days.
So these are three easy and simple ways you can use to convert a date value into the day name in Excel.
I hope you found this tutorial helpful!
Other Excel tutorials you may also like:
- How to Get the First Day of the Month in Excel (Easy Formulas)
- How to Add or Subtract Days to a Date in Excel
- How to Calculate the Number of Days Between Two Dates in Excel
- How to Group Dates in Pivot Tables in Excel (by Years, Months, Weeks)
- How to Calculate Age in Excel using Formulas + FREE Calculator Template
- Check IF a Date is Between Two Given Dates in Excel
- How to Autofill Only Weekday Dates in Excel (Formula)