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
Class | Name | Description |
Year | int | The year (from 1 to 9999). |
month | int | The month (from 1 to 12). |
day | int | The day (from 1 to the number of days in month). |
hour | int | The hours (from 0 to 23). |
minute | int | The minutes (from 0 to 59). |
second | int | The seconds (from 0 to 59). |
Return value
Class | Description |
datetime | A datetime type instance that is initialized. |
Sample code
1: | datetime dt = new datetime(2016, 3, 4, 4, 13, 0); |
Notes
It's a wrapper of the System.DateTime.DateTime(Int32, Int32, Int32, Int32, Int32, Int32) constructor.