--- title: "Date & Time Actions" slug: "date-and-time-actions" description: "This is a list of the Date & Time Actions that can be performed with RapidIdentity Connect." tags: ["Connect", "Actions", "RapidIdentity "] updated: 2022-06-02T20:39:26Z published: 2022-06-02T20:39:26Z canonical: "help.rapididentity.com/date-and-time-actions" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Date & Time Actions ## Date & Time Actions ### adjustDate Adjust a Date object | Property | Value | Description | | --- | --- | --- | | date* | expression, variable | the base Date object | | offset* | expression, variable | the amount of time to add/subtract from the date | | unit* | choice (year, month, week, day, hour, minute, second, millisecond), text, expression, variable | the adjustment unit | | timezone | text, expression, variable | the timezone (default: current server timezone) | | locale | text, expression, variable | the locale (default: current server locale) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varToday = today() tomorrow = adjustDate(varToday, 1, "day") yesterday = adjustDate(varToday, -1, "day") ``` ### dateFromFILETIME Convert a Windows FILETIME value to a Date/Time. | Property | Value | Description | | --- | --- | --- | | filetime* | expression, variable | the FILETIME value to convert | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript records = getADRecords(sessionAD, Global.adBaseDN, "sub", filter, "cn=Administrator, lastLogon") lastLogonDateTime = dateFromFILETIME(record['lastLogon']) ``` ### dateToFILETIME Convert a Date/Time to a Windows FILETIME. | Property | Value | Description | | --- | --- | --- | | date* | expression, variable | the Date/Time to convert | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varNow = now() nowFileTime = dateToFILETIME(varNow) ``` ### formatDate Format a Date object as a Date/Time String. | Property | Value | Description | | --- | --- | --- | | date* | expression, variable | the Date object to format | | pattern* | text, expression, variable | the Date/Time pattern | | timezone | text, expression, variable | the timezone (default: current server timezone) | | locale | text, expression, variable | the locale (default: current server locale) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varNow = now() nowLDAP = formatDate(varNow, "yyyyMMddhhmmssZ") ``` ### now Get the current Date/Time as a Date object. | Property | Value | Description | | --- | --- | --- | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varNow = now() ``` ### parseDate Parse a Date/Time string into a Date. | Property | Value | Description | | --- | --- | --- | | dateString* | text, expression, variable | the Date/Time string to parse | | pattern* | text, expression, variable | the Date/Time pattern | | timezone | text, expression, variable | the timezone (default: current server timezone) | | locale | text, expression, variable | the locale (default: current server locale) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript record = getLDAPRecord(ldapConnection, "cn=admin,ou=users, ou=system,o=meta", "modifyTimestamp") modificationTime = parseDate(record['modifyTimestamp'], "yyyyMMddhhmmssZ") ``` ### today Get the current Date as a Date object. | Property | Value | Description | | --- | --- | --- | | timezone | text, expression, variable | the timezone (default: current server timezone) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varToday = today() ``` ### truncateDate Truncate a Date/Time to a unit boundary. | Property | Value | Description | | --- | --- | --- | | date* | expression, variable | the base Date object | | unit* | choice (year, month, week, day, hour, minute, second), text, expression, variable | the boundary units | | timezone | text, expression, variable | the timezone (default: current server timezone) | | locale | text, expression, variable | the locale (default: current server locale) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript varToday = today() varYear = truncateDate(varToday, "year") varMonth = truncateDate(varToday, "month") ```