Calculation Issues

Compare a Date with January 1, 2018 in Excel

Kushani NimanthikaKushani Nimanthika Nov 18, 2026 868 views

Question details

Determine whether the date in cell A1 is later than January 1, 2018 using an Excel formula.

How to Compare a Date with January 1, 2018 in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants a formula that returns 1 for a later date and 0 otherwise, without relying on ambiguous date text.
Observed behavior
The desired formula compares A1 with a fixed date consistently across regional date formats.
Before you start

Make sure A1 contains a real Excel date rather than a date stored as text. Check whether your regional settings use commas or semicolons to separate formula arguments.

Solution 1Recommended

Compare the Date Using IF and DATE

Use DATE to specify the cutoff without relying on a regional date format.

1
Select the result cell

Click an empty cell, such as B1, next to the date in A1.

2
Enter the formula

Type =IF(A1>DATE(2018,1,1),1,0) in B1 and press Enter. If your regional settings require semicolons, use =IF(A1>DATE(2018;1;1);1;0).

3
Check the result

Review B1: it returns 1 if A1 is later than the start of January 1, 2018, and 0 otherwise. Drag B1's fill handle down to compare additional dates in column A.

Compare the Date Using IF and DATE
Dates with times: If A1 includes a time, a value on January 1 after midnight is later than DATE(2018,1,1). To compare only the calendar date, use =IF(INT(A1)>DATE(2018,1,1),1,0).
Compare dates in WPS Spreadsheets

Compare Dates with IF and DATE in WPS Spreadsheets

Use the same IF and DATE formula in WPS Spreadsheets to test dates against January 1, 2018 and return a numeric result.

  1. 1. Open your spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Select a result cell: Click an empty cell such as B1 next to the date in A1.
  3. 3. Enter the comparison: Type =IF(A1>DATE(2018,1,1),1,0) and press Enter. If needed, replace the argument-separating commas with semicolons.
  4. 4. Apply it to other dates: Drag the fill handle from B1 down column B to compare additional dates in column A.
Compare dates without typing an ambiguous date stringOpen and edit Microsoft Excel XLSX and XLS filesApply the formula to multiple rows with the fill handleWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I include January 1, 2018 in the results?

Use =IF(A1>=DATE(2018,1,1),1,0). The >= operator returns 1 for the cutoff date as well as later dates.

Why does Excel reject the formula?

Your regional settings may require semicolons as argument separators. Try =IF(A1>DATE(2018;1;1);1;0).

What if the date in A1 is stored as text?

Convert it to a real date before comparing it. Select the cell and use Data > Text to Columns, choosing the appropriate date order in the final step.

Why does a date on January 1 return 1?

A1 may include a time after midnight. To compare only the calendar date, use =IF(INT(A1)>DATE(2018,1,1),1,0).