List.DateTimes

List.DateTimes(start as datetime,count as number,step as duration) as list

返回大小为 countdatetime 值的列表,从 start 开始。给定的增量 step 是加到每个值的 duration 值。

示例:

从新年前 5 分钟(#datetime(2011, 12, 31, 23, 55, 0))开始创建 10 个值的列表,以 1 分钟为增量(#duration(0, 0, 1, 0))。

使用情况:

List.DateTimes(#datetime(2011, 12, 31, 23, 55, 0), 10, #duration(0, 0, 1, 0))

输出:
{
    #datetime(2011, 12, 31, 23, 55, 0),
    #datetime(2011, 12, 31, 23, 56, 0),
    #datetime(2011, 12, 31, 23, 57, 0),
    #datetime(2011, 12, 31, 23, 58, 0),
    #datetime(2011, 12, 31, 23, 59, 0),
    #datetime(2012, 1, 1, 0, 0, 0),
    #datetime(2012, 1, 1, 0, 1, 0),
    #datetime(2012, 1, 1, 0, 2, 0),
    #datetime(2012, 1, 1, 0, 3, 0),
    #datetime(2012, 1, 1, 0, 4, 0)
    }

results matching ""

    No results matching ""