Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
JScript
getDate Method (Windows Scripting - JScript)

Updated: March 2009

Returns the day-of-the-month value in a Date object using local time.

dateObj.getDate() 

The required dateObj reference is a Date object.

To get the day-of-the-month value using Universal Coordinated Time (UTC), use the getUTCDate method.

The return value is an integer between 1 and 31 that represents the day-of-the-month value in the Date object.

The following example illustrates the use of the getDate method.

function DateDemo(){
   var d;
   var s = "Today's date is: ";
   d = new Date();
   s += (d.getMonth() + 1) + "/";
   s += d.getDate() + "/";
   s += d.getFullYear();
   return(s);
}

Date

History

Reason

March 2009

Replaced obsolete method in example code.

Content bug fix.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker