DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Get the Weekday Name From A Date in Excel!

Get the Weekday Name From a Date in Excel:

Sometimes we want to know the Weekday Name just because we forget that. So there are ways to Get the Weekday Name from a Date in Excel. Let’s step into this article and see how to ** Get the Weekday Name from a Date in Excel 365**.

How to Format a Date as the Weekday Name?

  • First, you are going to see how to format the date cells.
  • Excel considers the date as serial numbers that start from 1 for the date 1900-01-01. You can format the date like yyyy-mm-dd, dd/mm/yyyy, dd-mm-yy, etc.
  • Formatting options to these serial numbers display the Weekday name with custom format (dddd or dd).
  • To do this, select the dates which you want to change into weekday names.
  • On the Home tab, click the launch icon at the corner of the numbers section. It will open the ** format cells** dialog box.
  • In the Format Cells dialog box, On the Number tab, select Custom as Category.
  • Enter dddd in the type field for the full weekday name or enter DDD for the abbreviated weekday name.
  • Hit the Ok button.

  • Now it will display the Weekday Name in the Selected Cells according to the date you entered.

How to Get the Weekday Name using TEXT Function?

  • You can use the TEXT Function to convert any date into text strings using the Weekday Name Format.
  • = TEXT ( Value, Format ) ” it is the syntax for TEXT Function.
  • For example, you need to enter this formula in the Formula bar like ” =TEXT ( B2, “dddd” ).
  • It will convert the Date into Weekday Name.

How to Get the Weekday Number using WEEKDAY Function?

  • You can also use the WEEKDAY Function to get the Weekday Number.
  • =WEEKDAY ( Date, [Type] ) ” is the syntax for WEEKDAY Function.
  • Date – the date to find the weekday number.
  • Type – the weekday number type to return.

  • For example, here we enter this formula as “** =WEEKDAY( B2, 1 )** ” this formula will calculate the date value into the corresponding weekday value.
  • The second argument will return 1 for Sunday through to 7 for Saturday, and it returns 6. So the Weekday for this date value is Friday.

Combining Switch with WEEKDAY to return the Weekday Name:

  • The WEEKDAY function only returns the number corresponding to that weekday name.
  • You can Combine Switch Function to get the WEEKDAY Name.
  • Use the following syntax of Switch Function to assign a Weekday Name to each number in the formula.
  • ” = SWITCH ( WEEKDAY (b2, 1), 1,”Sun”, 2, “Mon”, 3, “Tue”, 4, “Wed”, 5, “Thurs”, 6, “Fri”, 7, “Sat” ) “

How to Get the Weekday Name using Power Query?

  • As we know, Power Query is used for data transformation, so We might use it for converting the date value into Weekday Name.
  • Select the cells that contain the date inside it.
  • On the data tab, Select From Table/Range ** option. It will open the **Power Query Editor Dialog box.
  • In Power Query Editor, select the Date Column. ** Then go to the **Add Column tab, Select Date Option, it will display the menu.
  • Choose Day from the menu and select the Name of the Day option.
  • It will display the WEEKDAY NAMES for the corresponding date you given in the date column.

  • You can see the following code that is generated automatically in the formula bar.
  • = Table.AddColumn(#”Changed Type”, “Day Name”, each Date.DayOfWeekName([Column1]), type text) “.
  • It uses the Date.DayOfWeekName Function to find the weekdays.

Wind-Up:

In this post, you can quickly learn the steps to ** Get the Weekday Name from a Date** in Excel 365. Kindly, Leave your feedback/queries in the below comment section. Thanks for visiting Geek Excel. Keep Learning!!

Top comments (0)