Official Docs: GlideDateTime
The scoped GlideDateTime default constructor, instantiates a new GlideDateTime object with the current date and time in Greenwich Mean Time (GMT). Optional 'value' parameter with a date and time value in the UTC time zone specified with the format yyyy-MM-dd HH:mm:ss
getDayOfWeekLocalTime
Gets the day of the week stored by the GlideDateTime object, expressed in the user's time zone
before
Returns true if the object's data time is before the input argument
addWeeksUTC
Adds a specified number of weeks to the current GlideDateTime object, expressed in the UTC time zone
getDaysInMonthLocalTime
Sets the day of the month to a specified value in the user's time zone
setMonthUTC
Sets the month stored by the GlideDateTime object to a specified value using the UTC time zone
compareTo
Compares two GlideDateTime objects
setGlideDateTime
Sets the date and time of the current object using an existing GlideDateTime object. This method is equivalent to instantiating a new object with a GlideDateTime parameter
setMonthLocalTime
Sets the month stored by the GlideDateTime object to a specified value using the current user's time zone
getMonthLocalTime
Gets the month stored by the GlideDateTime object, expressed in the current user's time zone
getLocalDate
Gets the date for the user's time zone
setYearUTC
Sets the year stored by the GlideDateTime object to a specified value using the UTC time zone
getDayOfWeekUTC
Gets the day of the week stored by the GlideDateTime object, expressed in the UTC time zone
getWeekOfYearUTC
Gets the number of the current week of the current year
setDayOfMonthLocalTime
Sets the day of the month to a specified value in the local time zone
addYearsUTC
Adds a specified number of years to the current GlideDateTime object, expressed in the UTC time zone
onOrAfter
Returns true if the object's data time is on or after the input argument
add
Adds a GlideTime object to the current GlideDateTime object
getInternalFormattedLocalTime
Returns local time with internal time format
subtract
Gets the duration difference between two GlideDateTime values. Pass a single paramter which specifies milliseconds to subtract from the current GlideDateTime object
getWeekOfYearLocalTime
Gets the number of the week stored by the GlideDateTime object, expressed in the user's time zone
getDisplayValueWithoutTZ
setDisplayValue
Sets a date and time value using the current user's display format and time zone. Also set an optional parameter 'format', to set date and time format
getUserFormattedLocalTime
Returns local time with user time format
getMonthUTC
Gets the month stored by the GlideDateTime object, expressed in the UTC time zone
addSeconds
Adds a specified number of seconds to the current GlideDateTime object
getDaysInMonthUTC
Gets the number of days in the month stored by the GlideDateTime object, expressed in the UTC time zone
getLocalTime
Returns a GlideTime object that represents the time portion of the GlideDateTime object in the user's time zone
addYearsLocalTime
Adds a specified number of years to the current GlideDateTime object, expressed in the user's time zone
getYearLocalTime
Gets the year stored by the GlideDateTime object, expressed in the current user's time zone
getDayOfMonthUTC
Gets the day of the month stored by the GlideDateTime object, expressed in the UTC time zone
getNumericValue
Gets the number of milliseconds since January 1, 1970, 00:00:00 Greenwich Mean Time (GMT)
getTime
Returns a GlideTime object that represents the time portion of the GlideDateTime object
isDST
Determines if an object's time uses a daylight savings offset
addMonthsUTC
Adds a specified number of months to the current GlideDateTime object, expressed in the UTC time zone
addDaysLocalTime
Adds a specified number of days to the current GlideDateTime object, expressed in the user's timezone
getDSTOffset
Gets the amount of time that daylight savings time is offset
hashCode
addMonthsLocalTime
Adds a specified number of months to the current GlideDateTime object, expressed in the user's time zone
getDisplayValueInternal
Gets the display value in the internal datetime format
getDayOfMonthLocalTime
Gets the day of the month stored by the GlideDateTime object, expressed in the current user's time zone
getDate
Gets the date in the system time zone
after
Returns true if the object's data time is after the input argument
getErrorMsg
Gets the current error message
getTZOffset
setDisplayValueInternal
Sets a date and time value using the internal format and the current user's time zone
onOrBefore
Returns true if the object's data time is on or before the input argument
setDayOfMonthUTC
Sets the day of the month to a specified value in the UTC time zone
isValid
Determines if a value is a valid datetime
hasDate
Determines if an object's date is set
setYearLocalTime
Sets the year stored by the GlideDateTime object to a specified value using the current user's time zone
setValueUTC
Sets a date and time value using the UTC time zone and the specified date and time format
getValue
Gets a datetiime value in the same format as it is stored in the database
getYearUTC
Gets the year stored by the GlideDateTime object, expressed in the UTC time zone
equals
getDisplayValue
Gets the datetime in the current user's display format and time zone
setValue
Sets the date and time
toString
Converts a datetime value to a string
addDaysUTC
Adds a specified number of days to the current GlideDateTime object, expressed in the UTC time zone
addWeeksLocalTime
Adds a specified number of weeks to the current GlideDateTime object, expressed in the user's timezone