RapidIdentity Product Guide: New UI

Date & Time Actions

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

Example

varToday = today()
tomorrow = adjustDate(varToday, 1, "day")
yesterday = adjustDate(varToday, -1, "day")

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

Example

records = getADRecords(sessionAD, Global.adBaseDN, "sub", filter, 
    "cn=Administrator, lastLogon")
lastLogonDateTime = dateFromFILETIME(record['lastLogon'])

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

Example

varNow = now()
nowFileTime = dateToFILETIME(varNow)

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

Example

varNow = now()
nowLDAP = formatDate(varNow, "yyyyMMddhhmmssZ")

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

Example

varNow = now() 

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

Example

record = getLDAPRecord(ldapConnection, "cn=admin,ou=users,
    ou=system,o=meta", "modifyTimestamp")
modificationTime = parseDate(record['modifyTimestamp'], 
    "yyyyMMddhhmmssZ")

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

Example

varToday = today() 

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

Example

varToday = today()
varYear = truncateDate(varToday, "year")
varMonth = truncateDate(varToday, "month")