Re: COMMAND DAY
Posted in 1996
Louis DeLongchamp — — source: Informix-list mailing list archive (1991-1998)
ida@kusza.edu.my wrote: >I just want to know a command to find the number of days for a certain month. >for example january 96 consist of 31 days feb consists of 28 days >Comeey This function will return the value you look for... function fn_leap(fndate) define fndate date, j, k smallint let j = month(fndate) if j = 4 or j = 6 or j = 9 or j = 11 then return 30 end if if j <> 2 then return 31 end if let k = year(fndate) if k mod 100 = 0 then if k mod 400 = 0 then return 29 else return 28 end if else if k mod 4 = 0 then return 29 end if end if return 28 end function