Domino Code Fragment

Code Name*
Append "Yesterday", "Today", or "Tomorrow" to Date
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.138.200.66
Description*
This formula makes it easier in your views to see that this date is yesterday, today, or tomorrow's date. For example, a view would appear as follows: 3-09-94 First entry Second entry 3-10-94 (Yesterday) First entry Second entry 3-11-94 (Today) First entry Second Entry 3-12-94 (Tomorrow) First entry Second entry Third entry 3-13-94 First entry Second entry In a Column Formula of a View:
Type*
Formula
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
REM "Puts yesterday, today, tomorrow, or NULL at end of date. ";
REM "DATEVARIABLE must be a date/time field.";
REM "Also, if DATEVARIABLE is blank by default, this formula gives "Incorrect data type for operator or @function".";
Msg := @If(@Date(DATEVARIABLE) = @Date(@Now); "(Today)"; @Date(DATEVARIABLE) = @Date(@Tomorrow); "(Tomorrow)"; @Date(DATEVARIABLE) = @Date(@Yesterday); "(Yesterday)"; "");
@Text(@Date(DATEVARIABLE)) + " " + Msg