FCLT#56360 'Elke tabel' en 'Elke SQL' ook seconden laten zien bij date/time velden

svn path=/Website/branches/v2018.2/; revision=40754
This commit is contained in:
Jos Groot Lipman
2019-01-31 11:37:59 +00:00
parent b033f3e007
commit 318612a02b
5 changed files with 6 additions and 3 deletions

View File

@@ -169,6 +169,7 @@ function model_generic(table, autfunction)
break;
case "DATE":
field.typ = 'datetime';
field.seconds = true; // die wil ik zien
if (field.dbs == model.table + "_datum" ||
field.dbs == model.table + "_van" ||
field.dbs == model.table + "_aanmaak")

View File

@@ -205,6 +205,7 @@ if (sql && sql != "opener")
else if (kolomtype == adDBTimeStamp)
{
colpar.datatype = 'datetime'; // ??
colpar.withSeconds = true;
}
rst.addColumn(new Column(colpar));
}

View File

@@ -225,7 +225,7 @@ function scf_ROFIELDTR(model, fld, val, key, params)
else
{
if (field.typ == "datetime")
txt = toDateTimeString(txt);
txt = toDateTimeString(txt, field.seconds);
else if (field.typ == "time")
txt = toTimeString(txt);
else if (typeof txt == "date" || txt instanceof Date)

View File

@@ -439,6 +439,7 @@ function scaffolding_list(model, scf_params)
var coldata = { caption: field.orglabel? field.orglabel: field.label,
content: fld,
datatype: field.typ,
withSeconds: field.seconds,
total: field.total,
decimals: field.decimals,
secret: field.secret };

View File

@@ -1714,8 +1714,8 @@ ResultsetTable.formatValue = function (val, params) //datatype, decimals)
switch (params.datatype)
{
case "date" : return toDateString(val, isExcel||isCSV, params.prettydate); // isExcel-->noDay
case "datetime": return toDateTimeString(val, false, isExcel||isCSV, params.prettydate);
case "time" : { val = toTimeString(val);
case "datetime": return toDateTimeString(val, params.withSeconds, isExcel||isCSV, params.prettydate);
case "time" : { val = toTimeString(val, params.withSeconds);
if (params.datatype == "time" && params.nomidnight && val == "00:00")
val = "";
return val;