Mysql Null Date
I have null date in Mysql and I formatted to display in grid. For a null date the grid shows "30 Nov 1899" . The script data "var myData" contains '0/0/0000' as I formatted from MySql database. I would like to show blank if the date is null.
I tried
var date = new Active.Formats.Date;
date.setDataFormat("auto");
date.setTextFormat("dd mmm yyyy");
date.setErrorText("");
date.setErrorValue(0);
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j])});
obj.setDataValue(function(i, j){
if (myData[i][j] != ''){return formats[j].dataToValue(myData[i][j])}
}
Could you please show me how to get the desired results.
Thanks
H
I tried
var date = new Active.Formats.Date;
date.setDataFormat("auto");
date.setTextFormat("dd mmm yyyy");
date.setErrorText("");
date.setErrorValue(0);
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j])});
obj.setDataValue(function(i, j){
if (myData[i][j] != ''){return formats[j].dataToValue(myData[i][j])}
}
Could you please show me how to get the desired results.
Thanks
H
H
April 9,