Date and Time function: – Visual basic offers date and time function that help us analyze and manipulate date and time value. The various date and time function are –

(1) Date: – The Date function returns the current date in format set in window control panel. The date function return the syntax date in variant date type in the mm-dd-yyyy format. Syntax of the date function is –

Date

(2) Time: – The Time function returns the current system time. This function return the system time in the variant date type and in the HH:MM:SS format. Where HH is the hour range from 00 to 23, MM is the minute range from 00 to 59 and SS is the second range from 00 to 59. Syntax of the time function is –

Time

(3) Now: – The Now function returns both system date and system time in a system format. Syntax of the Now function is –

Now

(4) Hour: – The Hour function returns a variant integer specifying a whole number between 0 and 23, inclusive, representing the hours of the day. Syntax of the hour function is –

Hour(time)

(5) Minute: – The Minute function returns a variant integer specifying a whole number between 0 and 59, inclusive, representing the minute of the hour. Syntax of the minute function is –

Minute(time)

(6) Second: – The second function returns the variant integer specifying a whole number between 0 and 59, inclusive, representing the second of a minute. Syntax of the second function is –

Second(time)

(7) Month: – The month function returns a variant integer specifying a whole number between 1 and 12, inclusive, representing the month of the year. Syntax of the month function is –

Month(date)

Miscellaneous function: – The miscellaneous function are used in visual basic programming for input, output and formatting data. There are two function available in this categories. They are InputBox and MsgBox.

Advertisements