Skip to content

Commit

Permalink
[MSSQL] Fix #9511 - Use QDate and QDateTime for date sql type
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 20, 2014
1 parent 530a36d commit 978086b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ QVariant::Type QgsMssqlProvider::DecodeSqlType( QString sqlTypeName )
}
else if ( sqlTypeName.startsWith( "date", Qt::CaseInsensitive ) )
{
type = QVariant::String;
type = QVariant::Date;
}
else if ( sqlTypeName.startsWith( "datetime", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "smalldatetime", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "datetime2", Qt::CaseInsensitive ) )
{
type = QVariant::String;
type = QVariant::DateTime;
}
else if ( sqlTypeName.startsWith( "time", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "timestamp", Qt::CaseInsensitive ) )
Expand Down

0 comments on commit 978086b

Please sign in to comment.