ユーザーガイド

Object datetime
NetTradeX PC
NetTradeX Android
NetTradeX iOS
NetTradeX Mobile
NetTradeX Advisors
Object datetime

Object datetime allows to work and receive information about a date and time in a convenient format.

After creating a new object, it has a value of the current date and time of a user computer.

Object methods

Method Description
string toString() Returns the string representation of a value stored in the object.
void fromString(string s) The method changes the value of an object. The string s must contain date/time in one of the following formats "YYYY.MM.DD HH:MM:SS" or "YYYY.MM.DD".

Object properties

Property Description
int Hour Returns current hour for a datetime object. The range of values is 0-23.
int Minutes Returns number of minutes passed from the beginning of the current hour. The range of values is 0-59.
int DayOfWeek Returns the ordinal number of the day of a week. Sunday - 0, Monday - 1 ... Saturday - 6.
int Day Returns the ordinal number of the current day of a month. The range of values is 1-31.
int DayOfYear Returns the ordinal number of the day of a year. The range of values is 1-366.
int Month Returns the ordinal number of a month. The range of values is 1-12.
int Year Returns the number of a year. Parameter ctm should correspond to the time lying between 1970 - 2037 years.