DateTimeParser ResolveDateTimeString() doesn't work with date format ddMMyyyy

May 9, 2011 at 9:03 AM

I'm using the TimePicker and have noticed, the method ResolveDateTimeString() of DataTimeParser class doesn't work with european date format ddMMyyyy.

For instance the method is called with parameter currentDate {09.05.2011 00:00:00}, the returned value will be "5.9.2011 00:00:0 AM" where the formerly day is now the month (9th) and the formerly month is day (5th).

Would be great, if this could be solved accordingly. 


May 9, 2011 at 1:33 PM

Can you please post the exact XAML snippet for the TimePicker?

May 10, 2011 at 8:10 AM

I use it like this:


<Controls:TimePicker x:Name="throughputTimeFrom" Width="100" Value="{Binding Model.ThroughputTimeFrom, Mode=TwoWay}" />

Bound to:

public DateTime? ThroughputTimeFrom    
      get      {        return m_throughputTimeFrom;      }
        m_throughputTimeFrom = value;

May 10, 2011 at 1:54 PM

Are you using a custom format?  What culture are you using?

May 11, 2011 at 8:14 AM

No, I don't use a custom format. The current cultures DisplayName is "German (Switzerland)" and name "de-CH".

May 11, 2011 at 3:20 PM

I see the issue now.  Not sure how I will fix it, but I will try.

May 11, 2011 at 5:15 PM

Okay, this has been resolved.  I had to change the way the parsing of the date parts.  Can you download the latest source and test it out for me?

May 12, 2011 at 6:12 AM

I've tested it and it works like a charm.

Thank you very much for your fast support!