List.DateTimeZones

Updated on

List.DateTimeZones is a Power Query M function that generates a list of datetimezone values with a specified size, starting point, and step increment. The function returns a list of datetimezone values incremented by the given duration value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

List.DateTimeZones(
   start as datetimezone,
   count as number,
   step as duration,
) as list

Description

Returns a list of datetimezone values of size count, starting at start. The given increment, step, is a duration value that is added to every value.

Examples

Create a list of 10 values starting from 5 minutes before New Year’s Day ( #datetimezone( 2011, 12, 31, 23, 55, 0, -8, 0 ) ) incrementing by 1 minute ( #duration( 0, 0, 1, 0 ) ).

List.DateTimeZones( #datetimezone( 2011, 12, 31, 23, 55, 0, -8, 0 ), 10, #duration( 0, 0, 1, 0 ) )

 /* Output: 
{
    #datetimezone( 2011, 12, 31, 23, 55, 0, -8, 0 ),
    #datetimezone( 2011, 12, 31, 23, 56, 0, -8, 0 ),
    #datetimezone( 2011, 12, 31, 23, 57, 0, -8, 0 ),
    #datetimezone( 2011, 12, 31, 23, 58, 0, -8, 0 ),
    #datetimezone( 2011, 12, 31, 23, 59, 0, -8, 0 ),
    #datetimezone( 2012, 1, 1, 0, 0, 0, -8, 0 ),
    #datetimezone( 2012, 1, 1, 0, 1, 0, -8, 0 ),
    #datetimezone( 2012, 1, 1, 0, 2, 0, -8, 0 ),
    #datetimezone( 2012, 1, 1, 0, 3, 0, -8, 0 ),
    #datetimezone( 2012, 1, 1, 0, 4, 0, -8, 0 )
}
 */ 

Other functions related to List.DateTimeZones are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/list-datetimezones

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy