mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 01:47:06 +08:00
update exp to sql
This commit is contained in:
parent
1a25f9485c
commit
e60137d606
@ -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}')";
|
||||
|
Loading…
Reference in New Issue
Block a user