Export (0) Print
Expand All

DateTimeUtil Class

Dynamics AX 2009

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


class DateTimeUtil extends Object

Called

Method

Description

cancelTimeOut

Cancels a previous method call to the Object.setTimeOut Method. (Inherited from Object.)

equal

Determines whether the specified object is equal to the current one. (Inherited from Object.)

getTimeOutTimerHandle

Returns the timer handle for the object. (Inherited from Object.)

handle

Retrieves the handle of the class of the object. (Inherited from Object.)

new

Initializes a new instance of the DateTimeUtil class.

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

owner

Returns the instance that owns the object. (Inherited from Object.)

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

toString

Returns a string that represents the current object. (Inherited from Object.)

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

wait

Pauses a process. (Inherited from Object.)

xml

Returns an XML string that represents the current object. (Inherited from Object.)

::addDays

Adds the specified number of days to a utcdatetime value.

::addHours

Adds the specified number of hours to a utcdatetime value.

::addMinutes

Adds the specified number of minutes to a utcdatetime value.

::addMonths

Adds the specified number of months to a utcdatetime value.

::addSeconds

Adds the specified number of seconds to a utcdatetime value.

::addYears

Adds the specified number of years to a utcdatetime value.

::anyToDateTime

Converts an anytype object to a utcdatetime value.

::applyTimeZoneOffset

Retrieves a utcdatetime value that is offset from the specified utcdatetime value by the amount indicated by the specified Timezone enumeration value.

::date

Converts the specified utcdatetime value to a date object.

::day

Retrieves the number of the day in the month that is specified by a utcdatetime value.

::getCompanyTimeZone

Gets the Timezone value that is used by the current company.

::getDifference

Gets the number of seconds between the two specified utcdatetime values.

::getSystemDateTime

Gets the current system time as a utcdatetime value.

::getTimeZoneOffset

Gets the offset of the specified utcdatetime value to UTC by using the information in a Timezone enumeration value.

::getUserPreferredCalendar

Gets the PreferredCalendar enumeration value of the current user.

::getUserPreferredTimeZone

Gets the PreferredTimezone enumeration value of the current user.

::hour

Retrieves the number of the hour in the day that is specified by a utcdatetime value.

::maxValue

Retrieves the maximum value that is allowed for a variable of the utcdatetime type.

::minute

Retrieves the number of the minute in the hour that is specified by a utcdatetime value.

::minValue

Retrieves the minimum value that is allowed for a variable of the utcdatetime type.

::month

Retrieves the number of the month in the year that is specified by a utcdatetime value.

::newDateTime

Creates a new utcdatetime value by using the specified date and timeOfDay values.

::parse

Creates a new utcdatetime value from the specified string.

::populateTimeZoneInfo

::removeTimeZoneOffset

Removes the offset that is indicated by a Timezone enumeration value from the specified utcdatetime value.

::second

Retrieves the number of the seconds in a minute that is specified by a utcdatetime value.

::setCompanyTimeZone

Sets the Timezone enumeration value used by the current company.

::setSystemDateTime

Sets the date and time of the system to the specified utcdatetime value.

::setUserPreferredCalendar

Sets the value of the PreferredCalendar enumeration type of the current user for the current session.

::setUserPreferredTimeZone

Sets the preferred timezone of the user to the specified Timezone enumeration value.

::time

Retrieves the number of seconds elapsed since midnight as a timeOfDay value from the specified utcdatetime value.

::toStr

Converts a utcdatetime value to a string with the following format: YYYY-MM-DDThh:mm:ss where T is a character literal.

::utcNow

Retrieves a utcdatetime value that indicates the current system time.

::year

Retrieves the number of the year that is specified by a utcdatetime value.

Community Additions

ADD
Show:
© 2014 Microsoft