Convert date to datetime
Datetime values where always converted to date(102) so sorting by time does not work. By converting to 120 (yyyy-mm-dd hh:mi:ss (24h)) the time is respected.
This commit is contained in:
committed by
Sebastiaan Janssen
parent
0e70416e27
commit
1e37410578
@@ -571,7 +571,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
public virtual string CreateDefaultConstraint => "ALTER TABLE {0} ADD CONSTRAINT {1} DEFAULT ({2}) FOR {3}";
|
||||
|
||||
public virtual string ConvertIntegerToOrderableString => "REPLACE(STR({0}, 8), SPACE(1), '0')";
|
||||
public virtual string ConvertDateToOrderableString => "CONVERT(nvarchar, {0}, 102)";
|
||||
public virtual string ConvertDateToOrderableString => "CONVERT(nvarchar, {0}, 120)";
|
||||
public virtual string ConvertDecimalToOrderableString => "REPLACE(STR({0}, 20, 9), SPACE(1), '0')";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user