Update exp to sql

This commit is contained in:
sunkaixuan 2022-04-14 18:36:14 +08:00
parent 64319b2407
commit 307c461cf7

View File

@ -989,7 +989,11 @@ namespace SqlSugar
public string GeDateFormat(string formatString, string value)
{
if (IsOracle() || IsPg())
if (IsOracle() && formatString == "yyyy-MM-dd HH:mm:ss")
{
return $"to_char({value},'yyyy-MM-dd HH:mi:ss') ";
}
else if (IsOracle() || IsPg())
{
return $"to_char({value},'{formatString}') ";
}