VBScript TimeSerial function
VBScript TimeSerial:
VBScript TimeSerial function returns the time for the specified hour, minute and second values.
Syntax :
TimeSerial(hour,minute,second)
Parameter Description :
Parameter | Mandatory | Explanation |
---|---|---|
Hour | Required parameter | It is an integer between 0 and 23 or any numeric expression. |
Minute | a Required parameter | It is an integer between 0 and 59 or any numeric expression. |
Second | a Required parameter | It is an integer between 0 and 59 or any numeric expression. |
Example
<!DOCTYPE html> <html> <body> <script language="vbscript" type="text/vbscript"> document.write(TimeSerial(21,11,3) & "<br />") document.write(TimeSerial(0,0,0) & "<br />") </script> </body> </html>
Output :
After running above script in IE we will get following output -
9:11:03 PM 12:00:00 AM