Do any of you know if I will run into errors with the following code come January?
SELECT (@Month(@GetField("OUT")) = @Month(@TextToTime("Today")) -1)
Do any of you know if I will run into errors with the following code come January?
SELECT (@Month(@GetField("OUT")) = @Month(@TextToTime("Today")) -1)
You can test if date field "OUT" is from previous month this way:
@Month(OUT) = @Month(@Adjust(@Today; 0; -1; 0; 0; 0; 0))
BUT, it is not recommended to use time-based functions (like @Today
or @TextToTime("Today")
) in view selections. Look here for more information.
You might also consider using a "user definable" column that uses @Return to abort the inclusion of any document that doesn't meet your criteria. Then you can update the corresponding profile document field in the Queryopen event of the view (if it doesn't already match the desired formula).