QDateTime QDateTime::fromString ( const QString & s, Qt::DateFormat f = Qt::TextDate ) [static] Returns the QDateTime represented by the string s, using the format f, or an invalid datetime if this is not possible. Note that Qt::LocalDate cannot be used here.