Domino Code Fragment

Code Name*
Convert Month Name to Month Number
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.137.192.3
Description*
The following code will convert a Month long name to the corresponding Month number.
Type*
Formula
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Rem "Get the year of the current date";
Y_MENU := @Text(B + @Year(@Now));

Rem "Build a string of month numbers";
M_DEX := "01" : "02" : "03" : "04" : "05" : "06" : "07" : "08" : "09" : "10" : "11" : "12";


Rem "Build a string of the Month long names";
M_MENU := @UpperCase("January" : "February" : "March" : "April" : "May" : "June" : "July" : "August" : "September" : "October" : "November" : "December");

Rem "Use the @Replace function to replace the month namer with the associated month number";
@Replace(@Text(@Month(@Today)); M_MENU ; @Text(@TextToNumber(M_DEX)))