Excel Date & Time: Ultimate Guide for HR, Projects & Finance

Introduction Welcome to our ultimate Excel DATE function tutorial, designed for HR, finance, and project managers who want to master time functions with ease.
The DATE and TIME functions in Excel are essential tools for manipulating dates, times, and calculating durations. Whether you are a project manager, HR professional, accountant, or a daily Excel user, these functions will help you automate tasks and save valuable time.

In this comprehensive guide, you will discover:

  • The basics of DATE and TIME functions.
  • How to extract a year, month, or day.
  • Calculating the difference between two dates or times.
  • Advanced practical cases in project managementhuman resources, and finance.
  • Free Excel files to download for practice.
  • SEO optimization to maximize the visibility of your article.

By the end of this article, you will master these functions like an expert!

1. DATE Function in Excel: Create and Manipulate Dates

The DATE(year, month, day) function allows you to generate a dynamic date by combining three numerical values.

1.1 Simple Example: Generate a Specific Date =DATE(2025;3;15) Result: 15/03/2025 1.2 Dynamic Example: Build a Date from Cells

If A1 contains the year, B1 the month, and C1 the day: =DATE(A1;B1;C1)
Advantage:
 The date updates automatically when the values change.

Practical Exercise:

  1. Create a dynamic date using cells A1 (year), B1 (month), and C1 (day).
  2. Add 45 days to this date using the formula =DATE(A1;B1;C1)+45.
  3. Format the cell to display the date in the dd/mm/yyyy format.
Using Excel DATE function to create and modify dates dynamically

2. TIME Function in Excel: Easily Manipulate Times

The TIME(hour, minute, second) function allows you to create a specific time.

2.1 Simple Example: Generate a Specific Time =TIME(14;30;0) Result: 14:30:00 (2:30 PM).

2.2 Add Time to an Existing Time

To add 90 minutes to a time in A1: =A1+TIME(1;30;0) Excel converts 1:30 into a numerical value and performs the calculation correctly.

Practical Exercise:

  1. Create a dynamic time using cells A1 (hours), B1 (minutes), and C1 (seconds).
  2. Add 2 hours and 15 minutes to this time using the formula =A1+TIME(2;15;0).
  3. Format the cell to display the time in the hh:mm:ss format.
Excel spreadsheet showing time calculation using TIME() function to add hours and minutes, with formatted hh:mm:ss results

3. Advanced Practical Cases

3.1 Human Resources Management

Calculate Age from a Birth Date =DATEDIF(A1; TODAY(); « Y ») &  » years » A1 contains the birth date.
Tip: Add & " years" to display the age in a readable format.
Leave Tracking

To calculate the number of leave days between two dates learning Excel DATE functions(excluding weekends and holidays): =NETWORKDAYS(A1; B1; Holidays!A1:A10) Holidays!A1:A10 contains the list of holidays.

Employee Time Tracking

To calculate daily working hours (arrival and departure times): =B1-A1 A1 = Arrival time (e.g., 08:30), B1 = Departure time (e.g., 17:00).
Formatting: Apply the [h]:mm format to display the duration correctly.

Practical Exercise:

  1. Create a time tracking table for an employee with columns DateArrival Time, and Departure Time.
  2. Calculate daily working hours using the formula =B1-A1.
  3. Format the cells to display times in the hh:mm format.

3.2 Project Management

Deadline Tracking

To calculate the number of days remaining before a deadline: =B1-TODAY() B1 contains the deadline date.

Task Duration Calculation

To calculate the duration between two dates (start and end): =B1-A1 A1 = Start date, B1 = End date.
Formatting: Apply the dd format to display the number of days.

Practical Exercise:

  1. Create a project tracking table with columns TaskStart Date, and End Date.
  2. Calculate the duration of each task using the formula =B1-A1.
  3. Format the cells to display the duration in days.

3.3 Machine Working Time Calculation

To calculate the operating time of a machine between two timestamps:=B1-A1 A1 = Start time (e.g., 09:00), B1 = End time (e.g., 18:30).
Formatting: Apply the [h]:mm format to display the duration correctly.

Practical Exercise:

  1. Create a machine working time tracking table with columns DateStart Time, and End Time.
  2. Calculate daily operating time using the formula =B1-A1.
  3. Format the cells to display the duration in the [h]:mm format.
Excel HR dashboard showing time calculation formulas: NETWORKDAYS for business days (excluding weekends/holidays) and time subtraction for work duration ([h]:mm format), with color-coded formatting

4. VBA Automation: Advanced Date Management

4.1 Automatically Convert Text Date to Excel Date Sub ConvertDate()
Dim Cell As Range
For Each Cell In Selection
Cell.Value = DateValue(Cell.Value)
Next Cell
End Sub
This macro automatically converts a text-formatted date into a real Excel date. 4.2 Automatically Add Days to a Date in a Column Sub AddDays()
Dim Cell As Range
For Each Cell In Selection
Cell.Value = Cell.Value + 30
Next Cell
End Sub Useful for payment deadlines and leave tracking.

Practical Exercise:

  1. Record a macro to automatically add 7 days to a selected date.
  2. Apply this macro to a column of dates to simulate weekly deadlines.

5. Formatting Results

5.1 Date Formatting

To display a date in the dd/mm/yyyy format:

  1. Select the cell.
  2. Right-click and choose Format Cells.
  3. Choose Date and select dd/mm/yyyy.

5.2 Duration Formatting

To correctly display durations exceeding 24 hours:

  1. Select the cell.
  2. Right-click and choose Format Cells. 3.Under Custom, enter [h]:mm.

Practical Exercise:

  1. Create a list of durations (e.g., 25:30, 50:45).
  2. Format the cells to correctly display these durations using [h]:mm.

6. Common Errors and Solutions

6.1 Invalid Dates

If a date is incorrect (e.g., =DATE(2025;15;10)), Excel automatically adjusts it.

6.2 Cell Format Issues

Ensure that the cell format is set to Date or Time to avoid incorrect results.

6.3 Calculation Errors

If a formula returns #VALUE!, check that the inputs are numerical values and not text.

7. SEO Optimization and Google Ranking

7.1 Strategic Keywords

  • DATE and TIME functions in Excel
  • Calculate durations in Excel
  • Manipulate dynamic dates in Excel
  • Date management in Excel

7.2 Long-Tail Keywords

  • « How to calculate age in Excel »
  • « Leave management in Excel with NETWORKDAYS »
  • « Calculate working time in Excel »
  • « Automate dates in Excel with VBA »

7.3 Internal and External Links

8. FAQ – Frequently Asked Questions

How to display a duration exceeding 24 hours?
Apply the [h]:mm format to correctly display long durations.

How to convert a text date to an Excel date? =DATEVALUE(A1) How to display the day or month name from a date? =TEXT(A1; « dddd ») // Returns « Monday »
=TEXT(A1; « mmmm ») // Returns « March »

9. Download Example Excel Files

Click here to download the example Excel files: This file is an automated tool for tracking attendance and working hours.tutorial on Excel DATE function It uses built-in formulas to calculate total hours, generate summaries, and provide HR metrics. Simply fill in the working hours in the Time Tracking sheet, and the rest updates automatically.
If a formula doesn’t work, check the formula in the affected column or copy it from a correct cell. Also, make sure the number of filled rows is consistent.