:: Forum >> Version 2 >>

show me the date -1 day

More information on this topic is available in the documentation section: /aw.formats.date/.

<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
Tuesday, July 10, 2007
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)
Tuesday, July 10, 2007
Thank you Alex...
it's work!!!
hasta la vista
Luli
Thursday, August 16, 2007



This topic is archived.

Back to /aw.formats.date/

Documentation:

Forum search