3.2.0

show me the date -1 day

<script>

// datasource with dates in iso8601 format
var myData = [
["Grid 1.0", "2004-05-18T00:00:00+01:00"],
["ActiveWidgets 2.0", "2006-02-08T00:00:00+01:00"]
];

// date converter
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");
date.setTextFormat("mmm-dd-yyyy");

// grid control
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setCellFormat(date, 1) // dates in the second column
obj.setColumnCount(2);
obj.setRowCount(2);
document.write(obj);

</script>

why the out.println show me "Feb-07-2006" instead "Feb-08-2006"?
i'm waiting for your answer.

Luli
July 10,
Probably you are in US timezone but the input date is in European timezone (GMT+1). AW uses the local timezone for the output text by default, but you can change this using setTextTimezone method -

http://www.activewidgets.com/aw.formats.date/settexttimezone.html
Alex (ActiveWidgets)
July 10,
Thank you Alex...
it's work!!!
hasta la vista
Luli
August 16,

This topic is archived.

See also:


Back to support forum