BrainDump
  Home arrow BrainDump arrow Page 3 - VBScript: Final 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 
 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: Final Date Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-04-01

    Table of Contents:
  • VBScript: Final Date Functions
  • Here and Now
  • Time is Always Against Us
  • Timer...It Has Its Eye On You
  • The TimeValue() Function

  • 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: 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

    More BrainDump Articles
    More By James Payne


       · Thanks for stopping by to read another article. In this episode we discuss the last...
     

    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 1 hosted by Hostway