mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Time function optimization
This commit is contained in:
@@ -878,7 +878,11 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public string GeDateFormat(string formatString, string value)
|
public string GeDateFormat(string formatString, string value)
|
||||||
{
|
{
|
||||||
if (formatString == "yyyy-MM-dd"&&IsSqlServer())
|
if (IsOracle())
|
||||||
|
{
|
||||||
|
return $"to_char({value},'{formatString}') ";
|
||||||
|
}
|
||||||
|
else if (formatString == "yyyy-MM-dd"&&IsSqlServer())
|
||||||
{
|
{
|
||||||
return $"CONVERT(varchar(100),convert(datetime,{value}), 23)";
|
return $"CONVERT(varchar(100),convert(datetime,{value}), 23)";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user