DateTimeUtil Class

Definition

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

public ref class DateTimeUtil : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class DateTimeUtil : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type DateTimeUtil = class
    inherit XppObjectBase
Public Class DateTimeUtil
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
DateTimeUtil
Attributes

Constructors

DateTimeUtil(IntPtr)

Fields

__k_DateTimeUtilId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addDays(utcdatetime, Int32)

Adds the specified number of days to a utcdatetime value.

addHours(utcdatetime, Int32)

Adds the specified number of hours to a utcdatetime value.

addMinutes(utcdatetime, Int32)

Adds the specified number of minutes to a utcdatetime value.

addMonths(utcdatetime, Int32)

Adds the specified number of months to a utcdatetime value.

addSeconds(utcdatetime, Int64)

Adds the specified number of seconds to a utcdatetime value.

addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
addYears(utcdatetime, Int32)

Adds the specified number of years to a utcdatetime value.

anyToDateTime(Object)

Converts an anytype object to a utcdatetime value.

applyTimeZoneOffset(utcdatetime, Timezone)

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

applyTimeZoneOffsetFilter(QueryFilter)

Applies the time zone offset to the filter.

applyTimeZoneOffsetRange(QueryBuildRange)

Applies the time zone offset to the range.

Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
date(utcdatetime)

Converts the specified utcdatetime value to a date type.

day(utcdatetime)

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

equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
getClientMachineTimeZone()

Gets the Timezone enumeration value on the client computer.

getCompanyTimeZone()

Gets the Timezone value that is set for the current legal entity.

GetCultureDisplayNameAndLCID(String)
getDifference(utcdatetime, utcdatetime)

Gets the number of seconds between two specified utcdatetime values.

getEndOfWeekDate(String, Date)
getEndOfYearDate(String, Date)
getFirstDayOfWeek(String)
getFirstWeekOfYear(String)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getOriginatingTimeZone(utcdatetime)

Gets the originating Timezone enumeration value of the specified utcdatetime value.

getStartOfWeekDate(String, Date)
getStartOfYearDate(String, Date)
getSystemDate(Timezone)
getSystemDateTime()

Gets the current system time as a utcdatetime value.

getTimeNow(Timezone)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getTimeZoneId(Timezone)
getTimeZoneOffset(utcdatetime, Timezone)

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

getTimeZoneRule(utcdatetime)

Returns the time zone rule that takes effect on the given date.

getToday(Timezone)
getUserPreferredCalendar()

Gets the PreferredCalendar enumeration value for the current user.

getUserPreferredTimeZone()

Gets the PreferredTimezone enumeration value for the current user.

getWeekOfYear(String, Date)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
hour(utcdatetime)

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

IsManagedValid() (Inherited from XppObjectBase)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
maxValue()

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

minute(utcdatetime)

Retrieves 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(utcdatetime)

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

newDateTime(Date, Int32)

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

newDateTime(Date, Int32, Timezone)
newmethod()

Initializes a new instance of the DateTimeUtil class.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
parse(String)

Creates a new utcdatetime value from the specified string.

populateTimeZoneInfo(Int32, Timezone)

Retrieves start and end dates and time bias.

removeTimeZoneOffset(utcdatetime, Timezone)

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

removeTimeZoneOffsetFilter(QueryFilter)

Removes the time zone offset from the filter.

removeTimeZoneOffsetRange(QueryBuildRange)

Removes the time zone offset from the range.

second(utcdatetime)

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

setCompanyTimeZone(Timezone)

Sets the Timezone enumeration value that is used by the current company.

setCompanyTimeZone(Timezone, Boolean)
setSystemDateTime(utcdatetime)

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

setSystemDateTimeWithCascadeOption(utcdatetime, Boolean)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setUserPreferredCalendar(PreferredCalendar)

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

setUserPreferredTimeZone(Timezone)

Sets the preferred time zone of the user to the specified Timezone enumeration value.

setUserPreferredTimeZone(Timezone, Boolean)
time(utcdatetime)

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

toFormattedStr(utcdatetime, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
toFormattedStr(utcdatetime, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
toStr(utcdatetime)

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

usageCount() (Inherited from XppObjectBase)
utcNow()

Retrieves a utcdatetime value that indicates the current system time.

VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)
year(utcdatetime)

Retrieves the year that is specified by a utcdatetime value.

Applies to