[Interest] QDate::fromString() parse error?

Charley Bay charleyb123 at gmail.com
Fri Feb 10 19:11:08 CET 2012


This *has* to work, but doesn't:

    // ...returns invalid QDate...
    QDate my_date = QDate::fromString("01/18/12", "MM/dd/YY" );

Why doesn't this work?

I also tried:

    // ...returns invalid QDate...
    QDate my_date = QDate::fromString("01/18/12", "MM'/'dd'/'YY" );

I don't get to control the format (I'm "reading-in" logs that were written
by another program).

The documentation suggests this should work, right?

--charley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120210/a22321b3/attachment.html>


More information about the Interest mailing list