When i test this code:
QVariant::QString is return while the field type is DATETIME. Why?Qt Code:
#if defined(Q_OS_WIN) if (baseDir.dirName().toLower() == "debug" || baseDir.dirName().toLower() == "release") baseDir.cdUp(); #elif defined(Q_OS_MAC) if (baseDir.dirName() == "MacOS") { baseDir.cdUp(); baseDir.cdUp(); baseDir.cdUp(); } #endif m_dbSQLite.setDatabaseName(baseDir.absolutePath()+"/Datas/Bels.sqlite"); if(m_dbSQLite.open()) { query.exec("SELECT [Birthdate] FROM Patients"); qDebug() << fld.type(); }To copy to clipboard, switch view to plain text mode
Thanks
Bookmarks