Skip to content
Permalink
Browse files
[MSSQL] Fix #9511 - Use QDate and QDateTime for date sql type
  • Loading branch information
NathanW2 committed May 20, 2014
1 parent 530a36d commit 978086badc342cba03e59e8b4191b35ee7cdd6ad
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/mssql/qgsmssqlprovider.cpp
@@ -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 ) )

0 comments on commit 978086b

Please sign in to comment.