SMART datagrid v.1 > Classes > DataField

Back  Forward

DataLudi.DataField.datetimeFormat  property

The format string which is used when loading CSV text to data set and converting the value of nonempty string to Date format in the field of which dataType is ValueType.DATETIME

If do not specify this property value, datetimeFormat of Data Set which belongs to this field will be used. If do not specify both, "yyyy/MM/dd hh:mm:ss* format will be used by default. 

Defaults to null.

Getter
function datetimeFormat(): String
Setter
function setDatetimeFormat(value: String)

Table-1  Date string conversion format
ValuePattern stringExplanation
YearyShould specify as one pattern between yy and yyyy. If specify as two-digit value, the value specified in baseYear will be added. The default value is 2000.
MonthMSpecify as MM pattern. It should be two-digit number value from "01" to "12".
DatedSpecify as dd pattern. It should be two-digit number value from "01" to "31".
am/pmaSpecify as a. It should be the same as one value which is set in amText or pmText.
HourHSpecify as HH pattern. It should be two-digit number value from "00" to "23". "24" will be 0 the next day.
MinutemSpecify as mm pattern. It should be two-digit number value from "00" to "11". If am/pm delimiter is the same as amText, "12" will be 0, and if it is the same as pmText, it will be noon.
SecondsSpecify as ss pattern. It should be two-digit number value from "00" to "59".
MilisecondSSpecify as SSS pattern. It should be three-digit number value from "000" to "999".
DelimiterYou can use data delimiter "/", ".", "-" and hour delimiter ":". You can also use blanks.
systemsystemIf specify conversion format string as "system", you can use JavaScript Date constructor to convert immediately without special conversion. Please refer to Date.parse() document about Date document and iso format (ISO 8601) which can be converted by JavaScript.
isoisoIf specify conversion format string as "iso", it will convert ISO standard date type string.
See Also
baseYear
amText
pmText
DataSet.booleanFormat
Date
Examples
Datetime Value