mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-26 10:19:40 +08:00
update exp to sql
This commit is contained in:
@@ -926,6 +926,10 @@ namespace SqlSugar
|
||||
{
|
||||
return $"strftime('%Y-%m-%d', {value})";
|
||||
}
|
||||
else if (IsSqlite() && formatString == "yyyy-MM-dd HH:mm:ss")
|
||||
{
|
||||
return $"strftime('%Y-%m-%d %H:%i:%S', {value})";
|
||||
}
|
||||
else if (IsSqlite() && formatString == "yyyy-MM")
|
||||
{
|
||||
return $"strftime('%Y-%m', {value})";
|
||||
@@ -958,6 +962,10 @@ namespace SqlSugar
|
||||
{
|
||||
return $"DATE_FORMAT({value}, '%Y%m%d')";
|
||||
}
|
||||
else if (IsMySql() && formatString == "yyyy-MM-dd HH:mm:ss")
|
||||
{
|
||||
return $"DATE_FORMAT({value}, '%Y-%m-%d %H:%i:%S')";
|
||||
}
|
||||
else if (IsMySql() && formatString.Contains("%"))
|
||||
{
|
||||
return $"DATE_FORMAT({value}, '{formatString}')";
|
||||
|
||||
Reference in New Issue
Block a user