On 03.08.2009 18:57, Fritz Zaucker wrote:
> Hi A.,
>
> for example:
>
>           var datefield   = new qx.ui.form.DateField();
>           datefield.setDateFormat(new 
> qx.util.format.DateFormat('yyyy-MM-dd'));
>
>           date = datefield.getDateFormat().format(datefield.getValue());
>
> Cheers,
> Fritz
>
> P.S.: You can of course use other formats than 'yyyy-MM-dd'
>
>    
Yep, this is works.
The thing is that

new qx.util.format.DateFormat('yyyy-MM-dd')

can't parse String, if there is something more than year, month, day;
For example, I got a fatal error while trying to parse
'2008-12-08 15:17:51.289'

That's working not as in Java.

> On Mon, 3 Aug 2009, A.Yerenkow wrote:
>
>    
>> Hello guys!
>> I'm trying to use a
>> var dateFormat = new qx.util.format.DateFormat("yyyy-MM-dd");
>> and trying to parse a string, but I get an error:
>>
>> message: Date string '2008-12-08 15:17:51.289' does not match the date
>> format: yyyy-MM-dd
>>
>> On my Java back-end this works just well.
>> In your docs, there are a note:
>>
>> parse(String dateStr)
>> Parses a date.
>> Uses the same syntax as the SimpleDateFormat class in Java.
>>
>> Only syntax? Or logic as the SimpleDateFormat too?
>>
>> Any help, how I should normalize all strings which can be dates,
>> timestamps, etc, to something which can be parsed by
>> qx.util.format.DateFormat?
>>
>>
>>      
>    


-- 
Best Regards
Alexander Yerenkow,
Generalissimo of UCT


------------------------------------------------------------------------------
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

Reply via email to