Date and time functions
Date and time functions functions for Power Query M language.
Functions
Function | Description |
---|---|
#datetime | Generates a date and time value using numerical inputs for the year, month, day, hour, minute, and (fractional) second. If any of the following conditions are not met, an error will be triggered: - T... |
DateTime.AddZone | Includes timezone details to the given dateTime value. The timezone information consists of timezoneHours along with a possible addition of timezoneMinutes, indicating the preferred deviation from UTC... |
DateTime.Date | This function retrieves the date portion of a dateTime, date, datetime, or datetimezone value. |
DateTime.FixedLocalNow | This function returns a specific datetime value that represents the current date and time on the system. This value remains constant and will not vary with multiple calls. In contrast, the DateTime.Lo... |
DateTime.From | This function retrieves a datetime value based on the input provided. You may also specify a cultural format (e.g. "en-US"). If the input is empty, the function will return null. If the input is alrea... |
DateTime.FromFileTime | This function takes the fileTime value and converts it into a datetime value in the local time zone. The fileTime value is a Windows file time value that calculates the number of intervals in 100-nano... |
DateTime.FromText | This function creates a date and time value from a text representation provided as input. Optionally, additional properties can be specified using a record parameter named options. The options record ... |
DateTime.IsInCurrentHour | It checks if the provided datetime value dateTime falls within the current hour based on the current date and time on the system. The input can be a datetime or datetimezone value. |
DateTime.IsInCurrentMinute | This function checks if a specific datetime value (dateTime) falls within the current minute on the system's date and time. The input parameter should be a datetime or datetimezone value. |
DateTime.IsInCurrentSecond | This function checks if the provided datetime value occurs during the present second based on the current date and time on the system. It takes a datetime or datetimezone value as input for evaluation... |
DateTime.IsInNextHour | This function checks if the provided date and time value, dateTime, falls within the next hour based on the current date and time of the system. It should be noted that the function will return false ... |
DateTime.IsInNextMinute | This function checks if the provided datetime value dateTime falls within the next minute based on the current date and time of the system. Please be aware that when a value from the current minute is... |
DateTime.IsInNextNHours | This function determines if the specified datetime value dateTime falls within the next number of hours based on the current date and time of the system. It should be noted that the function will retu... |
DateTime.IsInNextNMinutes | This function checks if the datetime value provided in the variable "dateTime" falls within the next few minutes based on the current date and time of the system. It should be noted that the function ... |
DateTime.IsInNextNSeconds | This function determines if the provided datetime value (dateTime) falls within the next specified number of seconds according to the current date and time on the system. It should be noted that the f... |
DateTime.IsInNextSecond | This function is used to check if the provided datetime value occurs in the next second based on the current date and time of the system. It should be noted that the function will return false if the ... |
DateTime.IsInPreviousHour | This function determines if the dateTime value provided is within the previous hour based on the current date and time of the system. Please note that if the value falls within the current hour, the f... |
DateTime.IsInPreviousMinute | This function determines if the provided datetime value, dateTime, falls within the previous minute based on the current date and time of the system. It should be noted that this function will return ... |
DateTime.IsInPreviousNMinutes | This function checks if the specified datetime value dateTime falls within the number of minutes before the current date and time on the system. The function returns false if the dateTime value is wit... |
DateTime.IsInPreviousNSeconds | This function determines if the specified dateTime value occurs within the past number of seconds based on the current system date and time. It should be noted that the function will return false if a... |
DateTime.IsInPreviousSecond | This function determines if the specified datetime value dateTime is from the second before the current date and time on the system. It is important to note that this function will return false if a v... |
DateTime.LocalNow | This function retrieves a datetime value that is set to the current date and time on the system. |
DateTime.Time | Returns the time component of the provided datetime value, dateTime. |
DateTime.ToRecord | This function will return a record that includes the individual components of the specified datetime value, dateTime.dateTime. The input parameter dateTime.dateTime should be a datetime value from whi... |
DateTime.ToText | The function returns a text representation of the dateTime input. An optional parameter, options, can be included to specify additional properties. The culture parameter is only utilized for older wor... |