SheetRocks
Documentation/Formulas/DATEONLY

DATEONLY

Extracts the date component from a datetime value, removing the time portion. The result is in workbook time zone.

Syntax

DATEONLY(datetime)

Arguments

Argument Description Required
datetime The datetime value to extract the date from Required

Examples

Extract date from a datetime value

=DATEONLY(A1)
Result ⇒ 1/15/2024
A
1 1/15/2024 2:30:45PM

Test that DATEONLY(NOW()) equals TODAY()

=DATEONLY(NOW()) = TODAY()
Result ⇒ TRUE

Extract date from timestamp with timezone handling

=DATEONLY(A1)
Result ⇒ 12/25/2023
A
1 12/25/2023 1:45:30PM

Related Functions

Other Date/Time functions:


← Back to Formula Reference