mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
Date::Low() fixed in MSSQL (it is Date(-4000,1,1) and MSSQL allows only dates >1753)
git-svn-id: svn://ultimatepp.org/upp/trunk@634 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d2e36924c4
commit
a3de6030bc
1 changed files with 2 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect)
|
|||
}
|
||||
switch(dialect) {
|
||||
case MSSQL:
|
||||
if(x.year < 1753) x.year = 1753; // Date::Low()
|
||||
*r << Format("convert(datetime, '%d/%d/%d', 120)", x.year, x.month, x.day);
|
||||
break;
|
||||
case ORACLE:
|
||||
|
|
@ -107,6 +108,7 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect)
|
|||
}
|
||||
switch(dialect) {
|
||||
case MSSQL:
|
||||
if(x.year < 1753) x.year = 1753; // Date::Low()
|
||||
*r << Format(x.hour || x.minute || x.second
|
||||
? "convert(datetime, '%d/%d/%d %d:%d:%d', 120)"
|
||||
: "convert(datetime, '%d/%d/%d', 120)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue