Skip to content

Commit

Permalink
支持年月日格式
Browse files Browse the repository at this point in the history
  • Loading branch information
boyxp committed Jan 17, 2024
1 parent a25521d commit 6c86336
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MongoDB/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ func datetime(t string) any {
if err==nil {
return _time
}
} else if(len(t)==10 && t[4]==45 && t[7]==45) {
_time, err := time.Parse("2006-01-02 15:04:05", t+" 00:00:00")
if err==nil {
return _time
}
}

return nil
Expand Down

0 comments on commit 6c86336

Please sign in to comment.