Value from

Returns the specified part of a date as an integer (numeric value). Use this function to work with dates in Eligibility Rules, more easily.

You can create numeric values for the following dates/times:

  • day of week (1-7; where Monday=1, Tues=2)
  • day of the month (1-31; where 2nd day of the month=2)
  • day of the year (1-365 or 366)
  • hour of the day (0-23)
  • minute of the hour (0-59)
  • month of the year (1-12; where Jan=1, Feb=2)
  • week of the year (1-52)
  • year (2019, where the year is a 4-digit number)

Example Use Case

Data held in your datastore uses numbers to represent days of the week. Using the value from function, you can create an Eligibility Rule to return the current day of the week as a number to compare against the data held in the datastore.

Example Eligibility Rule

You want to set up an offer that will run between 9-11am. You can check the current time using the following rule:

hour_of_day value from now >=9 AND hour_of_day value from now <=11

Exp - value from