VBScript TimeValueFunction
Complete VBScript Reference Manual
The TimeValue function returns a Variant of subtype Date containing the time.
Syntax
TimeValue(time)
| Parameters | Description |
|---|---|
| time | Required. A time between 0:00:00 (12:00:00 A.M.) - 23:59:59 (11:59:59 P.M.), or any expression representing a time within this range. |
Examples
Examples
<script type="text/vbscript">
document.write(TimeValue("5:55:59 PM") & "<br />")
document.write(TimeValue(#5:55:59 PM#) & "<br />")
document.write(TimeValue("15:34"))
</script>
document.write(TimeValue("5:55:59 PM") & "<br />")
document.write(TimeValue(#5:55:59 PM#) & "<br />")
document.write(TimeValue("15:34"))
</script>
Output of the above example:
5:55:59 PM
5:55:59 PM
3:34:00 PM
5:55:59 PM
3:34:00 PM
Try it yourself »
Complete VBScript Reference Manual Other Extensions