Populate a editable field with the correct number of days in a month

Set the KeyField below to the field containing the target month.
Lotus Formula


KeyField := StartMonth ;

TwentyEight := "1" : "2" : "3" : "4" : "5" : "6" : "7" : "8" : "9" : "10" : "11" : "12" : "13" : "14" : "15" : "16" : "17" : "18" : "19" : "20" : "21" : "22" : "23" : "24" : "25" : "26" : "27" : "28" ;

Thirty := TwentyEight : "29" : "30" ;

ThirtyOne := Thirty : "31" ;

@If(
KeyField="1" ; ThirtyOne ;
KeyField="2" ; TwentyEight ;
KeyField="3" ; ThirtyOne ;
KeyField="4" ; Thirty ;
KeyField="5" ; ThirtyOne ;
KeyField="6" ; Thirty ;
KeyField="7" ; ThirtyOne ;
KeyField="8" ; ThirtyOne ;
KeyField="9" ; Thirty ;
KeyField="10" ; ThirtyOne ;
KeyField="11" ; Thirty ;
KeyField="12" ; ThirtyOne ;
ThirtyOne )

Posted by fbrefere001 on Thursday September 4, 2003