Qooxdoo: var dateFormatFull = new qx.util.format.DateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS"); try { alert(dateFormatFull.parse("2009-06-19 10:31:47.282863")); } catch(e) { qx.log.Logger.info(e); }
Produces: Error: name: Error message: Date string '2009-06-19 10:31:47.282863' does not match the date format: yyyy-MM-dd HH:mm:ss.SSSSSS Java: SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS"); Date date = dateFormat.parse("2009-06-19 10:31:47.282863"); System.out.println("date = " + date); Produces: date = Fri Jun 19 10:36:29 EEST 2009 I found that DateFormat.js // __parseRules contains only SSS, while there can be from S to SSSSSS. Also, if to DateFormat.js // __parseFeed add two more fields, like: "partialRegex" and "partialPattern", then method "parse" can be simple copied and named "extract", the only difference - which regex it took. "partialPattern" should be same as "pattern", except for ^ and $ symbols. And with this tweak, even crazy patterns as "MM-dd HH:mm" can be parsed just fine, and of course "yyyy-MM-dd". ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel