datevalueof[Qx,component]
Date/Time
Extracts a specific component (year, month, or day) from a date question response. The date is stored internally as YYYYMMDD; this function returns the requested part as an integer.
Parameters
| Parameter | Type | Description |
|---|---|---|
Qx |
Question ref | A *DATE question |
component |
Y / M / D | Y = year, M = month (1–12), D = day (1–31) |
Returns: Integer — the specified date component
Examples
expressions
datevalueof[Q14,Y]>=2024 -- purchased in 2024 or later datevalueof[Q14,M]=12 -- purchased in December datevalueof[Q14,D]<=15 -- purchased in first half of month
Month values are 1–12 (January = 1). Day values are 1–31.