mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-01 16:43:03 -06:00
Thermal Fracture Import: handle more date time formats.
This commit is contained in:
1 parent
f9ef7a1413
commit
107a4dfe95
1 file changed
+13
@@ -184,6 +184,19 @@ QDateTime RifThermalFractureReader::parseDateTime( const QString& dateString )
|
||||
dateTime = QDateTime::fromString( dateString, dateFormat );
|
||||
}
|
||||
|
||||
// Sometimes the datetime field has different year definition
|
||||
if ( !dateTime.isValid() )
|
||||
{
|
||||
QString dateFormat = "dd-MM-yyyy hh:mm:ss";
|
||||
dateTime = QDateTime::fromString( dateString, dateFormat );
|
||||
}
|
||||
|
||||
if ( !dateTime.isValid() )
|
||||
{
|
||||
QString dateFormat = "dd-MM-yyyy";
|
||||
dateTime = QDateTime::fromString( dateString, dateFormat );
|
||||
}
|
||||
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user