Home Cooker Classes Others Rice CookerGX
Classes  >  datetime  >  datetime(int,int,int,int,int,int)
datetime class : datetime(int,int,int,int,int,int) fitter

Description

Return a datetime type instance that is initialized by the specified Year, month, day, hour, minute, and second.

Syntax

new datetime(int Year,int month, int day, int hour, int minute, int second)

Arguments

ClassNameDescription
YearintThe year (from 1 to 9999).
monthintThe month (from 1 to 12).
dayintThe day (from 1 to the number of days in month).
hourintThe hours (from 0 to 23).
minuteintThe minutes (from 0 to 59).
secondintThe seconds (from 0 to 59).

Return value

ClassDescription
datetimeA datetime type instance that is initialized.

Sample code

datetime dt = new datetime(2016, 3, 4, 4, 13, 0);//It is the time of this writing.

Notes

It's a wrapper of the System.DateTime.DateTime(Int32, Int32, Int32, Int32, Int32, Int32).

Links for reference

Copyright © Rice All rights reserved.