update exp to sql

This commit is contained in:
sunkaixuna 2022-01-08 11:29:11 +08:00
parent f48fe8065b
commit 1a25f9485c

View File

@ -926,6 +926,18 @@ namespace SqlSugar
{ {
return $"strftime('%Y-%m-%d', {value})"; return $"strftime('%Y-%m-%d', {value})";
} }
else if (IsSqlite() && formatString == "yyyy-MM")
{
return $"strftime('%Y-%m', {value})";
}
else if (IsSqlite() && formatString == "yyyyMM")
{
return $"strftime('%Y%m', {value})";
}
else if (IsSqlite() && formatString == "yyyyMMdd")
{
return $"strftime('%Y%m%d', {value})";
}
else if (IsSqlite() && formatString.Contains("%")) else if (IsSqlite() && formatString.Contains("%"))
{ {
return $"strftime('{formatString}', {value})"; return $"strftime('{formatString}', {value})";