DateTime class
From Catglobe Wiki
More actions
DateTime
The DateTime object
Constructors
Methods
Properties
- array AsArray { get; } - Return value as the array representation of a date
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
DateTime dt = new DateTime ();
print(dt.AsArray);//{2017,10,2,4,13,34,583,40,0}
DateTime dt = new DateTime("2009/04/05");
print(dt.ToString());//2009-04-05 00:00:00
DateTime dt = new DateTime("2017/02/14");
print(dt.AsArray);//{2017,2,14,0,0,0,0,7}
DateTime dt = new DateTime({2017,10,2,4,13,34,583,40,0});
print(dt.ToString());//2017-10-02 04:13:34
print(dt.AsUnixtimeMillisecondsSince1970());//1506917614583
print(dt.AsUnixtimeSecondsSince1970());//1506917614