The VBA SECOND Function

Description

The VBA Second Function returns the second component of a supplied time. The syntax of the function is:

Second( time )

VBA Second Function Example

A simple example of the VBA Second function is shown below:

Const CurrTime = "17:56:33"
Dim SecNum As Integer

SecNum = Second(CurrTime)

After running the above snippet of VBA code, the variable 'SecNum' holds the value 33, which is the second component of the supplied time "17:56:33".

Return to the VBA Operators & Functions Page

Return to the Excel VBA Tutorial Page

Valid XHTML 1.0 Transitional Valid CSS!
Disclaimer   Privacy Policy
Copyright © 2008-2013 ExcelFunctions.net