VBScript Second Function

Advertisements


Second :

The Second Function returns a number between 0 and 59 that represents the Second of the hour for the specified time stamp.

Syntax :

Second(time) 

Example

<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">

 document.write("Line 1: " & Second("3:13:25 PM") & "<br />")
 document.write("Line 2: " & Second("23:13:45") & "<br />")
 document.write("Line 3: " & Second("2:20 PM") & "<br />")
 
</script>
</body>
</html>

When you save it as .html and execute it in Internet Explorer, then the above script will produce the following result:

Line 1: 25
Line 2: 45
Line 3: 0


Advertisements
Advertisements