VBScript TimeValue Function



VBScript TimeValue

VBScript TimeValue Function converts the given input string to a valid time.

Syntax :

TimeValue(StringTime) 

Example

<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">
 
document.write(TimeValue("00:56") & "<br />")
document.write(TimeValue("05:11") & "<br />")
document.write(TimeValue("12:12:12") & "<br />")

</script>
</body>
</html>

Output :

After running above script in IE we will get following output –

12:56:00 AM
5:11:00 AM
12:12:12 PM