datetime in 4GL
Posted in 1995
Ed Schaefer — — source: Informix-list mailing list archive (1991-1998)
Greetings fellow Informix 4GLer's: I have a question/obersevation converning using datetime in Informix 4GL. Informix 4.11 running under SCO to be exact. Consider the following stub code: main define dt1, dt2, dt3, time_tot decimal(6,2), mins decimal(6,2) let dt1 = current let time_tot = 6.5 let mins = 6.5 * 60 let dt2 = dt1 + time_tot units hour # add the hours let dt3 = dt1 + mins units minute # add the minutes end main You would think both dt2 and dt3 would be the same answer, but the hours datetime calculation dt2, drops the decimal part of the hour. The minutes calculation, dt3, is correct. This isn't a real "show stopper", but am I missing something here? Please advise, ed schaefer