Date & Time Actions
  • 02 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Date & Time Actions

  • Dark
    Light

Article summary

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

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

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

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

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

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

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

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

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

Was this article helpful?

What's Next
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence