mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-15 20:49:31 +08:00
Time function optimization
This commit is contained in:
parent
1266a3f3db
commit
6b931162c8
@ -878,7 +878,11 @@ namespace SqlSugar
|
||||
|
||||
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)";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user