please check the api [1] how to format date. you should use mm instead of nn for minutes;)
format.setIncommingDateFormat(new qx.util.format.DateFormat("yyyy-MM-dd HH:mm:ss")); and yyyy instead of YYYY for year format.setDateFormat(new qx.util.format.DateFormat("MM.yyyy")); regards Sak [1] http://demo.qooxdoo.org/current/apiviewer/#qx.util.format.DateFormat > Hello, > > i try your class , but the problem is not fixed > > a date like > > 2000-01-01 00:00:00 > > is in the output: > > 01.1999 > > > > their must be a big bug in the qooxdoo date class. > > > my code looks like this > > > var format = new > myapp.system.ui.table.cellrenderer.Date(); > format.setIncommingDateFormat(new > qx.util.format.DateFormat("yyyy-MM-dd HH:nn:ss")); > format.setDateFormat(new > qx.util.format.DateFormat("MM.YYYY")); > tcm.setDataCellRenderer(k++, format); > >> Hi, >> >> I guess you are looking for a solution as I shared as enhancement some >> weeks ago. Just take a look here : >> http://bugzilla.qooxdoo.org/show_bug.cgi?id=5457 >> >> regards Sak >> >>> Hi, >>> >>> Please provide a working playground example, so that we can have a look >>> on >>> it. >>> >>> Tino >>> >>> >>> Am 05.09.2011 um 14:15 schrieb smisobnline: >>> >>> Hello, >>> >>> i create my own class , based upon the date classf rom qooxdoo. i only >>> change the format of teh given date to transfer mysql ateformat. See >>> code below >>> >>> >>> some date strings i give >>> >>> 2002-12-31 >>> 2000-01-01 >>> >>> result in wrong values. Sometimes it gives a year more back and >>> sometimes a year less >>> >>> 2000-01-01 = 1.1.1999 >>> 2002-12-31 = 31.1.2003 >>> >>> is this a bug inside the date format clas from qooxdoo? >>> >>> What can i be? >>> >>> >>> >>> >>> >>> >>> qx.Class.define("makebiz.system.ui.table.cellrenderer.Date", { >>> extend : qx.ui.table.cellrenderer.Date, >>> members : { >>> _getContentHtml : function(cellInfo){ >>> var df = this.getDateFormat(); >>> if (df){ >>> if (cellInfo.value) { >>> if(cellInfo.value.length == 10) { >>> var el,el1,el2 = []; >>> el = cellInfo.value.split(" "); >>> var el1 = el[0].split("-"); >>> var datum = new >>> Date(el1[0],(el1[1]-1),el1[2],0,0,0); >>> cellInfo.value = datum; >>> } >>> else if(cellInfo.value.length == 19) { >>> var el,el1,el2 = []; >>> el = cellInfo.value.split(" "); >>> var el1 = el[0].split("-"); >>> var el2 = el[1].split(":"); >>> var datum = new >>> Date(el1[0],(el1[1]-1),el1[2],el2[0],el2[1],el2[2]); >>> cellInfo.value = datum; >>> } >>> else { >>> return ""; >>> } >>> >>> //alert(cellInfo.value + " -> " + df.format(cellInfo.value)); >>> return >>> qx.bom.String.escape(df.format(cellInfo.value)); >>> } else { >>> return ""; >>> } >>> } >>> else{ >>> return cellInfo.value || ""; >>> } >>> } >>> } >>> }); >>> >>> ------------------------------------------------------------------------------ >>> Special Offer -- Download ArcSight Logger for FREE! >>> Finally, a world-class log management solution at an even better >>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >>> download Logger. Secure your free ArcSight Logger TODAY! >>> http://p.sf.net/sfu/arcsisghtdev2dev >>> _______________________________________________ >>> qooxdoo-devel mailing list >>> qooxdoo-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >>> >>> Tino Butz >>> Mobile Architect >>> >>> 1&1 Internet AG - Web Technologies >>> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe >>> Telefon: +49 721 91374-4488 >>> tino.b...@1und1.de<mailto:tino.b...@1und1.de> >>> >>> Amtsgericht Montabaur / HRB 6484 >>> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Robert >>> Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan >>> Oetjen >>> Aufsichtsratsvorsitzender: Michael Scheeren >>> >>> ------------------------------------------------------------------------------ >>> Special Offer -- Download ArcSight Logger for FREE! >>> Finally, a world-class log management solution at an even better >>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >>> download Logger. Secure your free ArcSight Logger TODAY! >>> http://p.sf.net/sfu/arcsisghtdev2dev_______________________________________________ >>> qooxdoo-devel mailing list >>> qooxdoo-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >>> >> >> >> ------------------------------------------------------------------------------ >> Special Offer -- Download ArcSight Logger for FREE! >> Finally, a world-class log management solution at an even better >> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >> download Logger. Secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsisghtdev2dev >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel