Add return type switching note
This commit is contained in:
parent
b25b2aa213
commit
dce5fd6552
1 changed files with 2 additions and 1 deletions
|
|
@ -332,7 +332,8 @@ var LOCALTIMESTAMP = jet.LOCALTIMESTAMP
|
||||||
// NOW returns current date and time
|
// NOW returns current date and time
|
||||||
var NOW = jet.NOW
|
var NOW = jet.NOW
|
||||||
|
|
||||||
// DATE_TRUNC returns the truncated date and time using optional time zone
|
// DATE_TRUNC returns the truncated date and time using optional time zone.
|
||||||
|
// Use TimestampzExp if you need timestamp with time zone and IntervalExp if you need interval.
|
||||||
func DATE_TRUNC(field unit, source Expression, timezone ...string) TimestampExpression {
|
func DATE_TRUNC(field unit, source Expression, timezone ...string) TimestampExpression {
|
||||||
if len(timezone) > 0 {
|
if len(timezone) > 0 {
|
||||||
return jet.NewTimestampFunc("DATE_TRUNC", jet.FixedLiteral(unitToString(field)), source, jet.FixedLiteral(timezone[0]))
|
return jet.NewTimestampFunc("DATE_TRUNC", jet.FixedLiteral(unitToString(field)), source, jet.FixedLiteral(timezone[0]))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue