Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old February 6th, 2004, 12:36 PM
Rich's Avatar
Rich Rich is offline
Administrator
Developer Shed Admin.
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 151 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 37 sec
Reputation Power: 10
Date and Time Functions

The most commonly used methods of Date are given below. for a complete listing, refer to Netscape's JavaScript Documentation.
getYear()
dateVar.getYear() returns a number like 96 corresponding to the year of dateVar.
getMonth()
Returns a number between 0 and 11 corresponding to months January to December.
getDate()
Returns the day of the month.
getDay()
Returns a number specifying the day of the week. Zero is for Sunday, one for Monday and so on.
getHours()
Returns a number between 0 and 23 specifying the hour of day.
//**************************************
//

To make it easy to handle date and time, JavaScript has a built in Date object. A Date variable has to be created explicitly before we can use it. this can be done using the following JavaScript statement.
dateVar = new Date();
this creates a variable called dateVar and initializes it to contain the curent date and time. if you want to initialize it with some other date and time, you can use any of the following alternate syntaxes.
dateVar = new Date("month day, year hours:minutes:seconds")
dateVar = new Date(year, month, day)
dateVar = new Date(year, month, day, hours, minutes, seconds)

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Date and Time Functions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




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