boundaries.yesterday() 函数
boundaries.yesterday()
返回一个记录,其中包含昨天的 start
和 stop
边界时间戳。
昨天是相对于 now()
。
函数类型签名
() => {stop: time, start: time}
有关更多信息,请参阅 函数类型签名。
示例
返回昨天的开始和结束时间戳
import "date/boundaries"
option now = () => 2022-01-02T13:45:28Z
boundaries.yesterday(
)// Returns {start: 2022-01-01T00:00:00.000000000Z, stop: 2022-01-02T00:00:00.000000000Z}
从昨天查询数据
import "date/boundaries"
day = boundaries.yesterday()
from(bucket: "example-bucket")
|> range(start: day.start, stop: day.stop)
此页是否对您有帮助?
感谢您的反馈!