Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: Date-Time Functions – Date(), Now() and Time()

Date()

Description: 

The Date() func­tion returns a Cur­rent sys­tem date.

Format:

Date()

Exam­ple:

Function FnDate()

   Dim dtDate

   dtDate = Date

   MsgBox "Current System Date is : " & dtDate

End Function
Date()

Date()

_________________________________________________________________________________________________
Now()

Description

The Now func­tion returns the Sys­tems cur­rent date and time.

Format:

Now()

Exam­ple:

Function FnNow()

    MsgBox "System's current date and time is " & Now    

End Function
Now()

Now()

_________________________________________________________________________________________________
Time()

Description

The Time func­tion returns the Sys­tems cur­rent time.

Format:

Time()

Exam­ple:

Function FnTime()

    MsgBox "System's time is " & Time    

End Function
Time()

Time()

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: