The following lists alphabetically built-in PTL functions used to convert values from one data type to another.
| Mode for convert time from Java to .Net representation TIME_DATE gets result as "yyyy.mm.dd"
This constants can be used together. Example, TIME_DATE | TIME_SECONDS gets result as "yyyy.mm.dd hh:mm:ss" |
| Java time and .Net time The application based on Java platform use the January 1, 1970 00:00:00.000 GMT as start point for calc time. It likes Unix/Linux system time or many other platforms (example, MQL4). But, MS .Net (and so PTL Builder) uses the January 1, 0001 00:00:00.000 GMT as start point for calc time. So, the Java time must be converted with special functions for correct applied in .Net application. |
These functions are placed in Convert package:
ColorFrom16BitColor
Gets a color by the specified 16bit-code
Syntax
ColorTo16BitColor
Gets a 16bit-code of the specified color
Syntax
StringToChar
Returns first character of specified string
Syntax
TimeToDouble
Converts datetime to double
Syntax
TimeToStr
Converts the Java datetime value in milliseconds to its equivalent string representation.
Syntax
Parameters
Example
string str; // str <- ""
str = TimeToStr(65688045, TIME_DATE); // str <- "1972.01.31"