ADD_TO_DATETIME
Add units to the a datetime object. Negative values will do the same as SUBTRACT_FROM_DATETIME.
Declaration
ADD_TO_DATETIME(datetime, number, unitString) -> datetime
Parameters
datetime - object - Any valid datetime object
number - number - How many units you want to add to the datetime object
unitString - string - The value of the units to add.
Return Values
datetime - DateTime Primitive Type - The resulting datetime object by adding the number of units to the input datetime.
DATE_FROM_DATETIME
Get the date object from a dateTime object.
Declaration
DATE_FROM_DATETIME(datetimeObject, formatOptions) -> dateObject
DATE_FROM_DATETIME(datetimeObject) -> dateObject
Parameters
datetimeObject - object - Any Datetime Object
formatOptions - string - Use the format options table to display the date time correctly
Return Values
dateObject - Date Primitive Type - The date part of the datetime object.
DATE_FROM_FORMAT
Given a date string return a date object.
Declaration
DATE_FROM_FORMAT(dateString, formatOptions, timeZoneString) -> dateString
DATE_FROM_FORMAT(dateString, formatOptions) -> dateString
DATE_FROM_FORMAT(dateString) -> dateString
Parameters
dateString - string - A string representing a date
formatOptions - string - A string representing the format of the date to be converted.
timeZoneString - string - A string representing a timezone
Return Values
dateString - Date Primitive Type - A string representing a date
DATETIME_FROM_FORMAT
Given a string and format, produce a datetime object
Declaration
DATETIME_FROM_FORMAT(dateTimeString, formatOptions, timeZone) -> dateTimeObject
DATETIME_FROM_FORMAT(dateString, formatOptions) -> dateTimeObject
DATETIME_FROM_FORMAT(dateString) -> dateTimeObject
Parameters
dateTimeString - string - A string representing the format of the datetime to be converted.
formatOptions - string - A string defining the format of the date to be converted.
timeZone - string - Timezone of the date to be converted.
dateString - string - A string representing the format of the date to be converted.
Return Values
dateTimeObject - DateTime Primitive Type - the resulting datetime object of the string passed in.
DATETIME_FROM_TIMESTAMP
Convert a timestamp into a datetime object
Declaration
DATETIME_FROM_TIMESTAMP(number, typeOfUnit) -> datetime
DATETIME_FROM_TIMESTAMP(number) -> datetime
Parameters
number - number - Number of units to be defined by format string
typeOfUnit - string - A string defining the format of the date to be converted.
Return Values
datetime - DateTime Primitive Type - Datetime object created by the timestamp entered.
DATETIME
Combine a date and time into a datetime object.
Declaration
DATETIME(dateObject, timeObject, timeZone) -> dateTime
Parameters
dateObject - object - A date object
timeObject - object - a time object
timeZone - string - String representation of the timeZone.
Return Values
dateTime - DateTime Primitive Type - the resulting datetime created by combining the date and time objects.
FORMAT_DATE
Produce a formatted string from a date object.
Declaration
FORMAT_DATE(dateObject, formatString, timeZone) -> formattedDateString
FORMAT_DATE(dateObject, formatString) -> formattedDateString
FORMAT_DATE(dateObject) -> formattedDateString
Parameters
dateObject - object - number of units to be defined by format string
formatString - string - string representing the format to be outputted.
timeZone - string - String representation of the time zone.
Return Values
formattedDateString - string - Resulting string from the Date Object given the format string.
FORMAT_DATETIME
Produce a formatted string from a datetime object.
Declaration
FORMAT_DATETIME(dateTimeObject, formatString, timeZone) -> formattedDateTimeString
FORMAT_DATETIME(dateTimeObject, formatString) -> formattedDateTimeString
FORMAT_DATETIME(dateTimeObject) -> formattedDateTimeString
Parameters
dateTimeObject - object - Any dateTime Object.
formatString - string - string representing the format to be outputted.
timeZone - string - String representation of the time zone.
Return Values
formattedDateTimeString - string - Resulting string from the DateTime Object given the format string.
FORMAT_TIME
Produce a formatted string from a time object.
Declaration
FORMAT_TIME(timeObject, formatString, timeZone) -> formattedTimeString
FORMAT_TIME(timeObject, formatString) -> formattedTimeString
FORMAT_TIME(timeObject) -> formattedTimeString
Parameters
timeObject - object - Any time object.
formatString - string - string representing the format to be outputted.
timeZone - string - String representation of the time zone.
Return Values
formattedTimeString - string - Resulting string from the timeObject given the format string.
NOW
Get the current date and time.
Declaration
NOW() -> dateTimeObject
NOW() -> dateTimeObject
Return Values
dateTimeObject - DateTime Primitive Type - DateTime object representing the current time.
SUBTRACT_FROM_DATETIME
Subtract units from the a datetime object. Negative values will do the same as ADD_TO_DATETIME.
Declaration
SUBTRACT_FROM_DATETIME(dateTime, number, unitString) -> datetime
Parameters
dateTimeObject - object - any dateTime object.
number - number - How many units you want to add to the datetime object
unitString - string - The value of the units to add: years, months, weeks, days, hours, minutes, seconds, milliseconds.
Return Values
datetime - DateTime Primitive Type - The resulting datetime object by adding the number of units to the input datetime.
TIME_FROM_DATETIME
Get the time object from a datetime object.
Declaration
TIME_FROM_DATETIME(dateTimeObject, timeZone) -> timeObject
TIME_FROM_DATETIME(dateTimeObject) -> timeObject
Parameters
dateTimeObject - object - Any dateTime object.
timeZone - string - String representation of the time zone.
Return Values
timeObject - Time Primitive Type - Time object from the datetime object.
TIME_FROM_FORMAT
Given a date time string and a format return a time object.
Declaration
TIME_FROM_FORMAT(dateString, formatOptions, timeZone) -> timeObject
TIME_FROM_FORMAT(dateString, formatOptions) -> timeObject
TIME_FROM_FORMAT(dateString) -> timeObject
Parameters
dateString - string - A string representing a time or datetime object
formatOptions - string - A string defining the format of the date to be converted.
timeZone - string - Timezone of the date to be converted.
Return Values
timeObject - Time Primitive Type - A time object generated from the input string and format string.
TIMESTAMP_FROM_DATETIME
Get the value of a dateTime object in timestamp format.
Declaration
TIMESTAMP_FROM_DATETIME(dateTimeObject, unitString) -> timestampValue
TIMESTAMP_FROM_DATETIME(dateTimeObject) -> timestampValue
Parameters
dateTimeObject - object - Any dateTime object.
unitString - string - String representation of the unit (s for seconds or ms for milliseconds).
Return Values
timestampValue - number - Number value of the dateTime object in seconds or milliseconds (default) from Jan 1 1970 12AM UTC.
UPDATE_DATETIME
Modify an input dateTime object with any number of dateTime options like days, months, years, hours, minutes, and seconds.
Declaration
UPDATE_DATETIME(dateTimeObject, updateObject) -> dateTimeObject
Parameters
dateTimeObject - object - Any dateTime object.
updateObject - object - An object consisting of value number pairs for updating a date time object, i.e. { "hours" : 3 }.
Return Values
dateTimeObject - DateTime Primitive Type - The resulting datetime object by taking the base and adding the update values.
Comments
0 comments
Please sign in to leave a comment.