|
Getting your Trinity Audio player ready...
|
Whether you’re tracking attendance, calculating age, or finding how long a task took, Excel’s Date & Time functions are super handy!
Let’s explore the most useful functions with easy examples.
Section 1: Date Functions
1. TODAY() – Insert Current Date
=TODAY()
Returns current date (updates daily)
Example: 05-06-2025
Tip: Use shortcut Ctrl+; (Ctrl+Semicolon) to get current date.
2. DAY(), MONTH(), YEAR() – Extract Date Parts
| Formula | Output |
|---|---|
=DAY("05-06-2025") | 5 |
=MONTH("05-06-2025") | 6 |
=YEAR("05-06-2025") | 2025 |
3. DATEDIF() – Calculate Age or Duration
=DATEDIF(A2, TODAY(), "Y")
Note: If A2 has Date of Birth, this formula calculates age in years.
4. EDATE() – Add/Subtract Months
=EDATE("01-01-2024", 3) → 01-04-2024
Tip: Perfect for calculating expiry, due, or renewal dates.
5. EOMONTH() – Get Last Date of Current Month
If today’s date is in cell A2, here’s how to get the last date of the same month:
=EOMONTH(A2, 0)
Note: EOMONTH stands for End Of Month, and 0 means the current month.
| A (Date) | Formula | Result |
|---|---|---|
| 05-06-2025 | =EOMONTH(A2, 0) | 30-06-2025 |
You can also use:
=EOMONTH(TODAY(), 0)
👉 This will always return the last date of the current month.
6. TEXT() – Format Date
=TEXT(TODAY(), "DD-MMM-YYYY") → 05-Jun-2025
Section 2: Time Functions
1. NOW() – Current Date + Time
=NOW()
Returns both current date and current time
Example: 05-06-2025 11:45 AM
Tip: Use shortcut Ctrl+Shift+: (Ctrl+Shift+Colon) to get current time.
2. HOUR(), MINUTE(), SECOND() – Extract Time Parts
Assume A2 = 02:30:45 (2 hours, 30 minutes, 45 seconds)
| Formula | Output |
|---|---|
=HOUR(A2) | 2 |
=MINUTE(A2) | 30 |
=SECOND(A2) | 45 |
3. Calculate Total Minutes from hh:mm:ss
You can convert time (like 2:30:45) to total minutes using this formula:
=HOUR(A2)*60 + MINUTE(A2) + SECOND(A2)/60
If A2 = 02:30:45, the result will be:
*60 + 30 + 45/60 = 150.75 minutes
Bonus Summary Table
| Function | Description | Example Output |
|---|---|---|
TODAY() | Current date | 05-06-2025 |
NOW() | Current date + time | 05-06-2025 11:45 AM |
DAY(), MONTH(), YEAR() | Extract parts of date | 5, 6, 2025 |
DATEDIF() | Difference between dates (e.g. age) | 28 (years) |
EDATE() | Add or subtract months | 01-04-2024 |
TEXT() | Format date/time into readable text | 05-Jun-2025 |
HOUR() | Extract hour from time | 2 |
MINUTE() | Extract minutes | 30 |
SECOND() | Extract seconds | 45 |
HOUR()*60 + MINUTE() + SECOND()/60 | Total minutes | 150.75 |
What’s Next?
In the next post, we’ll learn about the NETWORKDAYS Function in Excel