VBScript: Final Date Functions - Time is Always Against Us
(Page 3 of 5 )
The Matrix (well the second part) is probably my favorite movie of all time, if not second favorite (behind Shamalyan's Sixth Sense). Unfortunately, my brother ruined the whole trilogy for me, by pointing out how everything Morpheus says is profound, or in that serious tone, with that know-it-all look on his face. Like imagine going to Denny's with that guy and ordering some breakfast:
Waitress: What would you like sugar?
Morpheus: The question isn't what would I like; it's what nutrients does my body require to function. But then, no matter what I eat, here in your world, in the real I will still be eating a mixture of amino acids.
Waitress: So the rooty tooty fresh and fruity?
Morpheus: Yeah. That sounds good...
And furthermore, women are always complaining about being fat. Wouldn't Trinity's residual self image have been chubby? And all the guys would have like really massive...feet. Anyway.
The Time() function does one thing and it does it well: it returns the current time based on your system. That being said, if the system time is wrong, then the time will be wrong also. Here it is in action:
<html>
<body>
<script type="text/vbscript">
document.write(Time)
</script>
</body>
</html>
The result?
11:08:34 AM
And again, you can manipulate and parse the increments of time in the following manner:
<html>
<body>
<script type="text/vbscript">
document.write("The current system time is: ") & (Time) & "<br />"
document.write("The hour is: ") & (DatePart("h",Time)) & "<br />"
document.write("The minute is: ") & (DatePart("n",Time)) & "<br />"
document.write("The second is: ") & (DatePart("s",Time)) & "<br /> <br />"
</script>
</body>
</html>
Here is the outcome:
The current system time is: 11:14:33 AM
The hour is: 11
The minute is: 14
The second is: 33
Next: Timer...It Has Its Eye On You >>
More BrainDump Articles
More By James Payne