Share via


DateTimeUtil Class

The DateTimeUtil class can be used to convert or modify utcdatetime and Timezone values.

Syntax

class DateTimeUtil extends Object

Run On

Called

Methods

  Method Description
Gg837448.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg837448.privmethod(en-us,AX.60).gif new Initializes a new instance of the DateTimeUtil class. (Overrides the new Method.)
Gg837448.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addDays Adds the specified number of days to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addHours Adds the specified number of hours to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addMinutes Adds the specified number of minutes to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addMonths Adds the specified number of months to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addSeconds Adds the specified number of seconds to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::addYears Adds the specified number of years to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::anyToDateTime Converts an anytype object to a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::applyTimeZoneOffset Retrieves a utcdatetime value that is offset from the specified utcdatetime value by the amount that is indicated by the specified Timezone enumeration value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::applyTimeZoneOffsetFilter Applies the time zone offset to the filter.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::applyTimeZoneOffsetRange Applies the time zone offset to the range.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::date Converts the specified utcdatetime value to a date type.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::day Retrieves the day of the month that is specified by a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getClientMachineTimeZone Gets the Timezone enumeration value on the client computer.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getCompanyTimeZone Gets the Timezone value that is set for the current legal entity.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getDifference Gets the number of seconds between two specified utcdatetime values.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getOriginatingTimeZone Gets the originating Timezone enumeration value of the specified utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getSystemDateTime Gets the current system time as a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getTimeZoneId
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getTimeZoneOffset Gets the offset of the specified utcdatetime value to UTC by using the information in a Timezone enumeration value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getTimeZoneRule Returns the time zone rule that takes effect on the given date.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getUserPreferredCalendar Gets the PreferredCalendar enumeration value for the current user.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::getUserPreferredTimeZone Gets the PreferredTimezone enumeration value for the current user.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::hour Retrieves the hour of the day that is specified by a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::maxValue Retrieves the maximum value that is allowed for a variable of the utcdatetime type.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::minute Retrieves the minute in the hour that is specified by a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::minValue Retrieves the minimum value that is allowed for a variable of the utcdatetime type.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::month Retrieves the month in the year that is specified by a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::newDateTime Creates a new utcdatetime value by using the specified date and timeOfDay values.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::parse Creates a new utcdatetime value from the specified string.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::populateTimeZoneInfo Retrieves start and end dates and time bias.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::removeTimeZoneOffset Removes the offset that is indicated by a Timezone enumeration value from the specified utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::removeTimeZoneOffsetFilter Removes the time zone offset from the filter.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::removeTimeZoneOffsetRange Removes the time zone offset from the range.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::second Retrieves the seconds in a minute that is specified by a utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::setCompanyTimeZone Sets the Timezone enumeration value that is used by the current company.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::setSystemDateTime Sets the date and time of the system to the specified utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::setUserPreferredCalendar Sets the value of the PreferredCalendar enumeration type of the current user for the current session.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::setUserPreferredTimeZone Sets the preferred time zone of the user to the specified Timezone enumeration value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::time Retrieves the number of seconds that have elapsed since midnight as a timeOfDay value from the specified utcdatetime value.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::toFormattedStr
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::toStr Converts a utcdatetime value to a string in the following format: YYYY-MM-DDThh:mm:ss, where T is a character literal.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::utcNow Retrieves a utcdatetime value that indicates the current system time.
Gg837448.pubmethod(en-us,AX.60).gif Gg837448.static(en-us,AX.60).gif ::year Retrieves the year that is specified by a utcdatetime value.

Top

Inheritance Hierarchy

Object Class
  DateTimeUtil Class

See Also

Time Zone Overview and Terminology

datetime2Str Function