BrainDump
  Home arrow BrainDump arrow Page 3 - VBScript: Final Date Functions
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? 
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
     
     
    ADVERTISEMENT


    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

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





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