Excel VBA Date And Time Function in Office 365 ~ Easy Tutorial!!
Tags: excelvbadateandtime, vbamacros
Published: 2020-12-18 12:22:44

---
title: Excel VBA Date And Time Function in Office 365 ~ Easy Tutorial!!
published: true
date: 2020-12-18 11:57:47 UTC
tags: ExcelVBADateandTime,VBAMacros,VBAMacros
canonical_url: https://geekexcel.com/excel-vba-date-and-time-function/
---

The [VBA](https://geekexcel.com/excel-office-365-vba-overview-definition-and-examples/) Date and Time Function help the developers to convert the date and time from one format to another. In this tutorial, we are going to see **how to use the VBA Date and Time function in Excel** with brief explanations. Let’s get into this article!!

## Date Functions in Excel VBA:

Let’s see the different types of date functions and their description in the below table.

| Date Function | Description |
| --- | --- |
| [Date](https://geekexcel.com/how-to-use-date-function-in-microsoft-excel-365/) | It will return the **current system date**. |
| CDate | This function will **convert a value into date format**. |
| DateAdd | It helps to return the **date to a specified time interval** that has been added. |
| DateDiff | This function will help to **return the difference between two date values**. |
| DatePart | Used to return a **specified part of the given date**. |
| DateSerial | It helps to return the **date for the given year, month, and date value**. |
| FormatDateTime | This function returns an **expression formatted as a date or time**. |
| IsDate | It is used to return **true when the supplied parameter is a valid date otherwise it will return false**. |
| [Day](https://geekexcel.com/how-to-use-excel-day-function-in-office-365-with-examples/) | Helps to **return the day (i.e. 1 to 31) of the specified date**. |
| [Month](https://geekexcel.com/how-to-use-month-function-in-microsoft-excel-365/) | This function will **return the month (i.e.1 to 12) of the specified date**. |
| [Year](https://geekexcel.com/how-to-use-year-function-in-excel-365/) | It helps to **return the four-digit year (from 1900 to 9999) of the specified date**. |
| MonthName | It is used to return the **name of the particular month for the specified date.** |
| [WeekDay](https://geekexcel.com/how-to-use-weekday-function-in-microsoft-excel-365/) | This function is used to **return the number 1 to 7 that represents the day of the week for a given date**. |
| WeekDayName | It helps to return the **weekday string name for the given date**. |

## Time functions in Excel VBA:

Different types of time functions available in Excel VBA.

| Time Function | Description |
| --- | --- |
| [Now](https://geekexcel.com/how-to-use-now-function-in-microsoft-excel-365/) | It is a function that **returns the current system date and time** |
| [Hour](https://geekexcel.com/how-to-use-hour-function-in-microsoft-excel-365/) | This function will **return the integer value (from 0 to 23) that represents the hours of a specified time** |
| [Minute](https://geekexcel.com/how-to-use-minute-function-in-excel-365/) | Helps to **return the integer value between 0 and 59 that represents the minutes of the given time** |
| [Time](https://geekexcel.com/how-to-use-time-function-in-excel-365/) | It will **return the current system time** |
| TimeSerial | A function, which **returns the time for the specific input of hour, minute, and second** |
| TimeValue | Helps to **return the serial number for a specific time** |

## Conclusion:

From this guide, you can easily understand how to use the **VBA Date and Time function in Excel**. You can also learn the different types of Date and Time functions available in Excel VBA. If you have any **questions,** feel free to **comment.** We will assist you.

### Read Also:

- **[Excel VBA Constants in Office 365 ~ Useful Guide!!](https://geekexcel.com/wp-admin/post.php?post=19915&action=edit)**
- **[Excel Office 365 VBA Variables & Data Types – A Complete Guide!!](https://geekexcel.com/wp-admin/post.php?post=19893&action=edit)**