ISO 9001:2015 Certified
Govt. of Karnataka Affiliated
ADV EXCEL CLASS NOTES

Date and Time Functions in Excel

Date and Time Functions help users work with dates, calculate age, find the current date and time, generate reports, and perform date-based calculations.

Important: Excel stores dates as serial numbers, allowing calculations such as finding age, service period, due dates, and project durations.

TODAY Function

The TODAY Function returns the current system date.

Example

=TODAY()

Result: 04-Jun-2026


NOW Function

The NOW Function returns the current date and current time.

Example

=NOW()

Result: 04-Jun-2026 10:30 AM

Real World Use

  • Login Time Tracking
  • Project Timestamp
  • Activity Monitoring

Difference Between TODAY and NOW

Feature TODAY() NOW()
Returns Date Yes Yes
Returns Time No Yes
Arguments None None

DATE Function

The DATE Function creates a valid Excel date using Year, Month, and Day values.

Syntax

=DATE(year,month,day)

Arguments

Argument Description
year Four-digit year value.
month Month number (1 to 12).
day Day number (1 to 31).

Example

=DATE(2026,6,4)

Result: 04-Jun-2026


DAY Function

Returns the day number from a date.

Syntax

=DAY(serial_number)

Example

=DAY("04-Jun-2026")

Result: 4


MONTH Function

Returns the month number from a date.

Syntax

=MONTH(serial_number)

Example

=MONTH("04-Jun-2026")

Result: 6


YEAR Function

Returns the year from a date.

Syntax

=YEAR(serial_number)

Example

=YEAR("04-Jun-2026")

Result: 2026


DATEDIF Function

The DATEDIF Function calculates the difference between two dates in years, months, or days.

Syntax

=DATEDIF(start_date,end_date,unit)

Arguments

Argument Description
start_date Beginning date.
end_date Ending date.
unit Specifies whether to return Years, Months, or Days.

Unit Codes

Unit Meaning
“Y” Complete Years
“M” Complete Months
“D” Total Days

Examples

Age in Years

=DATEDIF(A2,TODAY(),"Y")

Service in Months

=DATEDIF(A2,TODAY(),"M")

Project Duration in Days

=DATEDIF(A2,B2,"D")