:: Forum >>
date off by 1 day
Need help. When I set the cell format to a date in the grid, the date that is being displayed is one day off. Instead of display 02 May 2007, 01 May 2007 is being displayed. If I set the cell format to String then 2007-05-02 is displayed. This tells me that the date being returned by the database is correct. During the format for some reason it is losing a day.
My date formating is
date.setDataFormat("ISO8601");
date.setTextFormat("dd-mmm-yyyy");
Any ideas?
Stephen
Stephen
Thursday, June 7, 2007
Alex (ActiveWidgets)
Thursday, June 7, 2007
Alex,
Thanks for your quick response, I believe my issue had to do with the fact that I of how I was populating the record inside of my JSP page.
What I originally had was:
<c:forEach var="row" items="${results}">
myData.push(["","${row.DOCID}","${row.ISSUE}"]);
</c:forEach>
I changed it to format it first then place it in the grid and all seems to be working.
<c:forEach var="row" items="${results}">
<fmt:formatDate var="ISSUE" value="${row.ISSUE}" pattern="MMM dd, yyyy" />
myData.push(["","${row.DOCID}","${ISSUE}"]);
</c:forEach>
Stephen
Thursday, June 7, 2007
This topic is archived.
Back to support forum
Forum search