Windows Scripting
  Home arrow Windows Scripting arrow Understanding Dates and Times in VBScript
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Understanding Dates and Times in VBScript
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2009-01-12

    Table of Contents:
  • Understanding Dates and Times in VBScript
  • VBScript’s VT_DATE Specification
  • The Significance of 30 Dec 1899
  • Using the VT_Time Specification

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More Windows Scripting Articles
    More By Nilpo


     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT