Search code examples
lotus-noteslotus-dominolotusscriptlotuslotus-formula

View Selection: Previous Month


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)


Solution

  • 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.