Understanding Dates and Times in VBScript
(Page 1 of 4 )
The idea of this article was originally to document all of VBScript’s functions for handling dates and times. However, as I began writing I quickly realized that there is much confusion surrounding how dates and times are handled in scripting. I decided instead to write an entire series dedicated to the topic. In the process, I will hopefully help you learn VBScript’s date and time functions while giving you a better understanding of the underlying technology.
As you move in to this series, expect some confusion. A lot of people believe that VBScript’s date and time functions are inherently buggy. This is a huge misconception! In fact, they were written to work around bugs in the underlying technology specifications. You’ll see as we move along that you do not need to work around these bugs; the functions do it for you—if you use them as they were intended!
While reading these articles, you will undoubtedly come across some things you won’t understand. Whether you’re a scripting beginner, or a seasoned programmer, it’s likely that you will see some information here with which you are unfamiliar. I’ll make every attempt to simplify my explanations. You may need to read something twice, or even move past it if you don’t understand it completely. That’s okay. I’ll make sure that the most important points are obvious. As a scripter you really only need to know the hows and not the whys. To do that, you will only require a basic understanding of a few key points. I’ll make sure to list those at the end.
In scripting, you will use two very different date and time formats—with the possibility of a third. We’re going to examine each of them one at a time and then look at how to use them together.
Next: VBScript’s VT_DATE Specification >>
More Windows Scripting Articles
More By Nilpo