BrainDump
  Home arrow BrainDump arrow Page 6 - VBScript: More Fun with the Date Functions
Iron Speed
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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM Developerworks
 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? 
BRAINDUMP

VBScript: More Fun with the Date Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-03-25

    Table of Contents:
  • VBScript: More Fun with the Date Functions
  • Parsing out the Month, Day, and Year from the Current Date:
  • Serial Dating
  • What Day is it Anyway?
  • Day, Month, Year, Hour, Minute, Second
  • Figuring Out Which Month it is

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    VBScript: More Fun with the Date Functions - Figuring Out Which Month it is
    (Page 6 of 6 )

    If you want to print out the name of a month (as opposed to the number, as with the Month() function), you can use the MonthName() function to do so. You can either return the full name or an abbreviated name by adding true to your code. Here is an example of how to use both methods:


    <html>

    <body>

    <script type="text/vbscript">

    document.write(MonthName(1))& "<br />"

    document.write(MonthName(2))& "<br />"

    document.write(MonthName(3))& "<br />"

    document.write(MonthName(4))& "<br />"

    document.write(MonthName(5))& "<br />"

    document.write(MonthName(6))& "<br />"

    document.write(MonthName(7))& "<br />"

    document.write(MonthName(8))& "<br />"

    document.write(MonthName(9))& "<br />"

    document.write(MonthName(10))& "<br />"

    document.write(MonthName(11))& "<br />"

    document.write(MonthName(12))& "<br />"

    document.write(MonthName(1,True))& "<br />"

    document.write(MonthName(2,True))& "<br />"

    document.write(MonthName(3,True))& "<br />"

    document.write(MonthName(4,True))& "<br />"

    document.write(MonthName(5,True))& "<br />"

    document.write(MonthName(6,True))& "<br />"

    document.write(MonthName(7,True))& "<br />"

    document.write(MonthName(8,True))& "<br />"

    document.write(MonthName(9,True))& "<br />"

    document.write(MonthName(10,True))& "<br />"

    document.write(MonthName(11,True))& "<br />"

    document.write(MonthName(12,True))& "<br />"

    </script>

    </body>

    </html>

    And here is the result:

      January
      February
      March
      April
      May
      June
      July
      August
      September
      October
      November
      December
      Jan
      Feb
      Mar
      Apr
      May
      Jun
      Jul
      Aug
      Sep
      Oct
      Nov
      Dec

    Well that's it for this article. Be sure to join us next time, when we pick up where we left off and work our way through the rest of the VBScript Date functions.

    Till then...


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Welcome back to our continuing discussion on VBScript date functions. Here we learn...
     

    BRAINDUMP ARTICLES

    - Handling Multiple Contracts with Indigo
    - Cleaning Out Your Data in XP
    - Multiple Service Contracts and Indigo
    - Cleaning Out Your Programs in XP
    - Handling Metadata with Indigo
    - Building Blocks for a WCF Service Web Site
    - Help! I Need Some Remote Assistance
    - Using Service Templates with Indigo
    - Windows XP Tips for Task Manager
    - Generating Clients and Services with Indigo
    - Vista SP1, A Review
    - Services and the WCF
    - VBScript: Final Date Functions
    - Creating Services with the WCF
    - The Resource View of the MFC

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway