Dates and tab-delimited files
For the life of me, I can't figure out this one aspect. Anybody willing to give help will be appreciated. My date value from my tab-delimited file is the number of milliseconds since 1/1/70 UTC as returned by getTime(). I am using a tab-delimited file. I'm using the following code. No matter what I try, the text format is always the data format!!!
// create data formats
var string = new Active.Formats.String;
var number = new Active.Formats.Number;
var date = new Active.Formats.Date;
// define formatting rule for text output
number.setTextFormat("");
date.setTextFormat("dd mmm yy");
date.setDataFormat("auto");
var table = new Active.Text.Table;
table.setProperty("URL", "/dev-bin/getGridText.pl?gridtype=1");
// set column formatting
formats = [number, string, string, string, string, date, date];
var obj = new Active.Controls.Grid;
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j]
)});
obj.setDataValue(function(i, j){return formats[j].dataToValue(myData[i][
j])});
obj.setColumnValues([0,1,2,5]);
obj.setProperty("column/count", 5);
obj.setModel("data", table);
table.request();
document.write(obj);
JT
September 23,