asp.net.ph

DateTime.Day Property

System Namespace   DateTime Structure


Returns the day of the month represented by this instance.

[ VB ]
<Serializable>
Public ReadOnly Property Day As Integer

[ C# ]
[ Serializable ]
public int Day { get; }

[ C++ ]
[ Serializable ]
public: __property int get_Day ( );

[ JScript ]
public Serializable
function get Day ( ) : int;

Property Value

The day value, between 1 and 31.

Example

The below code snippet demonstrates using the Day property.

System.DateTime moment = new System.DateTime (
                        1999, 1, 13, 3, 57, 32, 11 );
// Year gets 1999.
int year = moment.Year;

// Month gets 1 ( January ).
int month = moment.Month;

// Day gets 13.
int day = moment.Day;

// Hour gets 3.
int hour = moment.Hour;

// Minute gets 57.
int minute = moment.Minute;

// Second gets 32.
int second = moment.Second;

// Millisecond gets 11.
int millisecond = moment.Millisecond;
  C# VB

See Also

DateTime Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph