← Course Home
Okta Certified Workflows - Specialty · Part II

Update Profile Attributes

31% of Part II — dates, conditions, and verifying the result.

Update Profile Attributes

Task 1: Calculate Dates

3 tasks · this deck covers task 1 of 3

↑ Update Profile Attributes Overview

The Task

"Calculate dates"

Profile attribute updates driven by time — contractor term dates, password expiry, review cycles — start with the Date and Time function group in Okta Workflows.

The Ten Date & Time Functions

Now — current date/time, various formats, all in UTC
Add / Subtract — add or remove a multiple of a time unit from a starting date
Difference — calculates the time between any two dates
Convert / Date to Text — reformats a date/time into a provided format in a specified time zone
Text to Date — creates a date/time from a text string per a specified format
Epoch — converts a date/time to seconds elapsed since Jan 1, 1970
ISO — corresponding ISO8601 string using UTC "Z" notation
UNIX — transforms date/time into UNIX standard format

Now — Always UTC

"Now — Calculates the current date and time in various formats, all in UTC time." Every calculation chain that needs "today" starts here, and every downstream comparison inherits that UTC baseline unless you explicitly convert.

Add / Subtract — Building Term Dates

Add — "Adds a multiple of a unit of time (for example, seconds) from a starting date and time."
Subtract — "Subtracts a multiple of a unit of time (for example, seconds) from a starting date."

This is the core mechanic for a contractor-onboarding scenario: take Now, Add 90 days to get a term end date, or Subtract 7 days from a start date to schedule a reminder.

Difference — Comparing Two Dates

"Difference — Calculates the difference in time between any two dates." Use this to check how much time remains before an attribute update should fire (e.g., days left until a term end date).

Formatting for Storage — Text to Date / Date to Text

Okta profile attributes and external systems don't always expect the same date representation Workflows computes internally. Date to Text converts a date/time into a provided format in a specified time zone; Text to Date does the reverse, parsing a text string into a date/time per a specified format.

The Angle — What Trips People Up

Watch for this in your own sandbox run:

→ Comparing a Now-derived UTC timestamp against a date pulled from a profile attribute in local time without converting first — Difference will silently compare the wrong instants.

→ Reaching for Epoch or ISO/UNIX conversions you don't actually need — most profile-attribute date math only needs Now, Add/Subtract, and Difference.

One Line To Remember

Now always returns UTC. Add/Subtract shift a date by a time unit; Difference compares two dates. Date to Text and Text to Date convert between date objects and formatted strings for storage — Epoch/ISO/UNIX are format-specific conversions for interop with other systems.

Sources: help.okta.com — Date and Time Functions (wf/en-us/.../functions.htm#datetime)