Skip to content

Latest commit

 

History

History
39 lines (37 loc) · 5.21 KB

File metadata and controls

39 lines (37 loc) · 5.21 KB
description Learn more about: DateTime functions
title DateTime functions
ms.date 11/21/2024
ms.topic language-reference
ms.custom nonautomated-date

DateTime functions

These functions create and manipulate datetime and datetimezone values.

Name Description
DateTime.AddZone Adds timezone information to the datetime value.
DateTime.Date Returns the date component of the given date, datetime, or datetimezone value.
DateTime.FixedLocalNow Returns the current date and time in the local timezone. This value is fixed and doesn't change with successive calls.
DateTime.From Creates a datetime from the given value.
DateTime.FromFileTime Creates a datetime from a 64-bit long number.
DateTime.FromText Creates a datetime from local and universal datetime formats.
DateTime.IsInCurrentHour Indicates whether this datetime occurs during the current hour, as determined by the current date and time on the system.
DateTime.IsInCurrentMinute Indicates whether this datetime occurs during the current minute, as determined by the current date and time on the system.
DateTime.IsInCurrentSecond Indicates whether this datetime occurs during the current second, as determined by the current date and time on the system.
DateTime.IsInNextHour Indicates whether this datetime occurs during the next hour, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current hour.
DateTime.IsInNextMinute Indicates whether this datetime occurs during the next minute, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current minute.
DateTime.IsInNextNHours Indicates whether this datetime occurs during the next number of hours, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current hour.
DateTime.IsInNextNMinutes Indicates whether this datetime occurs during the next number of minutes, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current minute.
DateTime.IsInNextNSeconds Indicates whether this datetime occurs during the next number of seconds, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current second.
DateTime.IsInNextSecond Indicates whether this datetime occurs during the next second, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current second.
DateTime.IsInPreviousHour Indicates whether this datetime occurs during the previous hour, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current hour.
DateTime.IsInPreviousMinute Indicates whether this datetime occurs during the previous minute, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current minute.
DateTime.IsInPreviousNHours Indicates whether this datetime occurs during the previous number of hours, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current hour.
DateTime.IsInPreviousNMinutes Indicates whether this datetime occurs during the previous number of minutes, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current minute.
DateTime.IsInPreviousNSeconds Indicates whether this datetime occurs during the previous number of seconds, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current second.
DateTime.IsInPreviousSecond Indicates whether this datetime occurs during the previous second, as determined by the current date and time on the system. This function returns false when passed a value that occurs within the current second.
DateTime.LocalNow Returns the current date and time in the local timezone.
DateTime.Time Returns the time part of the given datetime value.
DateTime.ToRecord Returns a record containing the datetime value's parts.
DateTime.ToText Returns a textual representation of the datetime value.
#datetime Creates a datetime value from year, month, day, hour, minute, and second.