Be the first user to complete this post
|
Add to List |
VBA-Excel: Date-Time Functions – Date(), Now() and Time()
Date()
Description:
The Date() function returns a Current system date.
Format:
Date()
Example:
Function FnDate() Dim dtDate dtDate = Date MsgBox "Current System Date is : " & dtDate End Function

_________________________________________________________________________________________________
Now()
Description
The Now function returns the Systems current date and time.
Format:
Now()
Example:
Function FnNow() MsgBox "System's current date and time is " & Now End Function

_________________________________________________________________________________________________
Time()
Description
The Time function returns the Systems current time.
Format:
Time()
Example:
Function FnTime() MsgBox "System's time is " & Time End Function

Also Read:
- VBA Excel - Cells, Ranges and Offset: Refer Range by using A1 Notations
- VBA-Excel: String Functions – Trim()
- VBA-Excel : 3D-Ranges - Working with Multiple WorkSheets At The Simultaneously
- VBA-Excel: Delete Blank Rows from Excel Work Sheet
- VBA-Excel: Date-Time Functions – CDate()