How to Get Day From Date in Excel

Learn multiple Excel methods to get day from date with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
10 min read • Last updated: 7/2/2025

How to Get Day From Date in Excel

Why This Task Matters in Excel

Extracting the day portion of a date appears, at first glance, like a minor detail—after all, it is only one element of a larger date‐time value. Yet across finance, operations, marketing, and analytics, knowing exactly which day a transaction occurred or will occur can drive everything from accurate cash–flow projections to precise supply-chain scheduling. Consider an accounts-payable manager who needs to identify invoices posted on the final business day of each month to apply specific accounting treatments. Or imagine a retail analyst breaking down daily sales to spot which calendar days in a promotional period performed best. In both situations, the analyst must isolate the day portion of thousands (or sometimes millions) of date values to summarize, filter, or join datasets correctly.

Industries as varied as transportation (monitoring delivery performance on specific calendar days), healthcare (tracking patient admissions by day of month), and human resources (examining employee start-dates to predict onboarding workloads) all rely on day-level granularity. Because Excel stores dates as serial numbers where the integer portion is a calendar day since 1-Jan-1900 (Windows default), the software excels at decomposing dates into individual components such as year, month, and day. Mastering “get day from date” skills opens the door to more advanced time-intelligence workflows: building dynamic month-end dashboards, creating rolling 30-day analyses, or engineering automated alerts when a due-date falls on the first or last day of a month.

Failing to extract the day correctly can cascade into deeper errors. A lookup that expects day numbers may break, a PivotTable may bucket dates incorrectly, or financial models could misalign cash receipts. Proficiency with day extraction also reinforces broader Excel fundamentals—understanding date serials, mastering text formatting, and chaining date functions into larger formulas—all of which are pivotal for power-users and beginners alike.

Best Excel Approach

For the vast majority of situations, the DAY function is the fastest, most reliable path to extract the calendar day (1 through 31) from any valid date in Excel. DAY is purpose-built: it requires only one argument, works with any Excel date serial, and always returns an integer. Its predictability and simplicity make it superior to text-parsing tricks or arithmetic workarounds.

Use DAY when:

  • You need the numeric day of month for calculations, lookups, or conditional logic
  • The source dates are stored as valid date serials (not text)
  • You want maximum compatibility across Excel versions, including Excel for the web

If, however, you need the weekday name (Monday-Sunday) or the weekday number (1-7), complement DAY with the TEXT or WEEKDAY functions rather than forcing custom math.

Syntax:

=DAY(serial_number)

serial_number
The date value, a reference to a cell containing a date, or a formula that evaluates to a date.

Alternative for weekday names:

=TEXT(serial_number,"dddd")   // Returns "Monday", "Tuesday", etc.

Alternative for weekday numbers:

=WEEKDAY(serial_number,2)     // Returns 1 for Monday … 7 for Sunday

Parameters and Inputs

  • serial_number (required): A valid Excel date or a cell reference. Internally, Excel stores dates as integers beginning with 1 for 1-Jan-1900 on Windows or 1-Jan-1904 on macOS.
  • Accepted data types: numeric date serials, date-formatted cells, results of date formulas (DATE, TODAY, EOMONTH), or numeric values returned by external data connections.
  • Optional arguments: DAY has none, which streamlines usage and lowers error risk. WEEKDAY’s optional “return_type” affects which weekday number represents Monday—vital for international calendars.
  • Data preparation: Ensure the cells are genuine dates, not text that looks like dates. Use VALUE or DATEVALUE to convert text when required.
  • Validation: Day returns a value between 1 and 31 inclusive; anything outside indicates the input is not a valid date. Wrap the result in IFERROR for robustness.
  • Edge cases: Empty cells return 0; dates before 1-Jan-1900, or dates imported as text strings like \"2023-07-04T00:00:00\", must be converted first.

Step-by-Step Examples

Example 1: Basic Scenario

Goal: Identify the day of month for a set of invoice dates stored in column A.

Sample data
[A2:A6]

  • 05-Jan-2024
  • 27-Jan-2024
  • 31-Jan-2024
  • 01-Feb-2024
  • 15-Feb-2024

Steps

  1. Select cell B2 next to the first date.
  2. Enter:
=DAY(A2)
  1. Press Enter. The result is 5.
  2. Copy the formula down to B6. You now have [5,27,31,1,15].

Why it works
Each entry in column A is stored as a serial number. DAY extracts the integer representing the day component, leaving month and year untouched. Because the invoices span two months, using DAY helps you filter end-of-month entries—notice the 31 in B4.

Common variations

  • Calculate the number of days until month-end: use EOMONTH to get the last day of the month, subtract the original date, and add 1 for an inclusive count.
  • Produce a conditional formatting rule that highlights invoices on the first day of any month: use `=DAY(`$A2)=1 as the formula.

Troubleshooting
If you see #VALUE!, the original “date” might be text. Convert using:

=DAY(VALUE(A2))

Example 2: Real-World Application

Scenario: A retail chain tracks daily sales in a table named SalesData with columns Date, Store, and Revenue. The finance team must evaluate average revenue “by calendar-day position” to detect whether revenue spikes on pay-day (usually the 1st, 15th, and 30th).

Data snapshot
[SalesData] table with 30,000 rows covering 50 stores over two years.

Walkthrough

  1. Add a new column in the table called DayOfMonth.
  2. In the first data row, enter:
=DAY([@Date])

Because it’s in an Excel Table, the formula fills automatically.
3. Create a PivotTable:

  • Rows: DayOfMonth
  • Values: Revenue (Average)
  1. Sort the PivotTable descending to see which day numbers generate the highest average sales chain-wide.

Business impact
The team discovers the 1st and 15th consistently outperform mid-month days. They adjust marketing spend to focus promotions around these days, yielding a measurable uplift.

Integration tips

  • Add a slicer for Store to compare patterns.
  • Use GETPIVOTDATA to pull the top-performing day into a dashboard.

Performance considerations
Because DAY is non-volatile and lightweight, even 30,000 rows recalculate almost instantaneously, making it preferable to array formulas or complex text parsing at this scale.

Example 3: Advanced Technique

Objective: Determine whether a project milestone falls on the “nth weekday” (e.g., the second Friday of a month), a common requirement for payroll and release cycles.

Data
Column A: MilestoneDate
Column B: Description

Steps

  1. In column C, extract weekday number:
=WEEKDAY(A2,2)   // 1=Monday … 7=Sunday
  1. Calculate “weekday occurrence” within the month:
=INT((DAY(A2)-1)/7)+1

Logic: Subtract 1, divide by 7, discard decimals, then add 1. This maps days 1-7 to 1st weekday, 8-14 to 2nd, etc.
3. Combine with weekday name for clarity:

=TEXT(A2,"dddd")&" "&INT((DAY(A2)-1)/7)+1
  1. Use an IF statement to flag second Fridays:
=IF(AND(WEEKDAY(A2,2)=5,INT((DAY(A2)-1)/7)+1=2),"2nd Friday","")

Professional tips

  • Convert the logic into a named formula SecondFriday for reuse across workbooks.
  • Replace hard-coded weekday numbers by referencing a mapping table to make functions locale-independent.
  • For performance on massive schedules, calculate weekday number and occurrence once and store the result rather than nesting formulas repeatedly.

Edge case handling

  • February can have only four occurrences of a given weekday in non-leap years; validate plan dates accordingly.
  • Time-zone adjustments: if dates originate from systems storing timestamps in UTC, round them with INT before extracting the day.

Tips and Best Practices

  1. Always store dates as proper date serials. Text that “looks like” a date will break DAY and WEEKDAY.
  2. Use Excel Tables so DAY formulas auto-expand when new rows are added.
  3. Combine DAY with conditional formatting to spotlight beginning-of-month or end-of-month records quickly.
  4. When building dashboards, create a dedicated Date dimension table containing pre-calculated Day, Weekday, Month, Quarter, and Year columns for better performance and cleaner formulas.
  5. Wrap DAY inside IFERROR when querying external data feeds where blank cells or malformed strings may occur.
  6. Avoid volatile functions like TODAY inside massive modeled formulas; calculate day once in a helper column instead of repeatedly within SUMPRODUCT or array calculations.

Common Mistakes to Avoid

  1. Parsing text with LEFT/RIGHT
    Why it happens: Users copy date values from CSV files that import as text.
    Fix: Convert to real dates with VALUE or DATEVALUE, then apply DAY.
  2. Assuming WEEKDAY equals DAY
    DAY returns day of month, while WEEKDAY returns day of week. Confusing them yields misleading results—especially in international teams.
  3. Ignoring regional date formats
    A formula may work on a machine using US settings but break in Europe if dates mis-import. Force ISO [YYYY-MM-DD] formats or construct dates with DATE(year,month,day).
  4. Using DAY in volatile array formulas unnecessarily
    Over-nesting DAY inside iterative calculations slows workbooks. Pre-calculate in helper columns.
  5. Forgetting to adjust for system date-system differences
    Mac default is 1904; Windows is 1900. When exchanging files across platforms, reconcile serial offsets to keep day numbers consistent.

Alternative Methods

MethodFormulaBest ForProsCons
DAY=DAY(A2)Numeric day of monthSimple, fast, cross-version compatibleCannot return weekday
TEXT=TEXT(A2,"d")Numeric day or =TEXT(A2,"dddd") for weekday nameFlexible formatting, supports leading zerosReturns text, not numbers; can break numeric logic
INT & MOD=INT(A2)-INT(EOMONTH(A2,-1))Day number without DAY functionWorks even in restricted spreadsheet engines lacking DAYHarder to read; prone to off-by-one errors
Power QueryDate.Day([Date])Data transformations before loading to sheetHandles millions of rows, no Excel formula overheadRequires refresh; learning curve
VBADay(Cell.Value)Custom automation, looping through rangesFull control, integrates with other codeRequires macro-enabled files; security prompts

Use DAY when you are working interactively in sheets. Use TEXT when you need a human-readable weekday label. Choose Power Query for ETL pipelines or very large datasets, and lean on VBA only for complex, scripted workflows.

FAQ

When should I use this approach?

Use DAY whenever you must reference the numeric calendar day, such as sorting month-end data, calculating term lengths inside a month, or building date keys for relational joins. It is ideal for transactional tables, small or large.

Can this work across multiple sheets?

Yes. Reference the date cell with its sheet name, for example =DAY(Sheet2!B4). If the formula will be copied across many worksheets, consider using a named range so you do not hard-code sheet names repeatedly.

What are the limitations?

DAY cannot identify the weekday or distinguish end-of-month status on its own. It also returns zero for blank inputs and produces #VALUE! for invalid entries. For localization, DAY is invariant, but your date inputs must follow valid serials.

How do I handle errors?

Wrap the call in IFERROR or LET for clarity:

=IFERROR(DAY(A2),"Not a date")

If the data feed may contain false zeros (value 0), add an additional test: IF(A2=0,"",DAY(A2)).

Does this work in older Excel versions?

DAY has existed since Excel 95, so compatibility is near universal: all desktop versions, Excel 365, Excel 2019, Excel for the web, and Excel on mobile platforms.

What about performance with large datasets?

DAY is non-volatile and computationally lightweight. Even 100,000 rows recalculate in under a second on modern hardware. For multi-million-row analysis, offload extraction to Power Query or a database server.

Conclusion

Mastering how to get the day from a date is deceptively powerful. The DAY function anchors countless reporting, filtering, and analytical workflows, while its companions TEXT and WEEKDAY provide human-friendly labels. By combining simple extraction techniques with best practices—such as storing dates properly, leveraging Tables, and guarding against errors—you not only prevent subtle calendar‐related mistakes but also open the door to richer time-series analysis. Continue expanding your date-handling toolkit with month and year functions, date arithmetic, and dynamic array skills, and you will transform raw timestamps into actionable business intelligence with confidence.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.