Re: ESQL/C and date/datetimes
Posted in 1998
Arun Shastry wrote: > > Jonathan Leffler wrote: > > > Arun Shastry wrote: > > > I hope Informix is planning on providing more functions/features in > > > their next ESQL/C release with regards to date/datetime fields > > > manipulation. > > > What they currently have in 7.2 is totally inadequate and buggy. > > > > Inadequate, maybe. Buggy? Justify this assertion! > > > > Is it just me or are you getting defensive here Jon :-) > > Try this for starters: > > Two datetime year to minute variables - 1997-07-31 15:33, 1997-08-06 > 10:21. > Convert them to decimal using rinvtodec > Convert the decimals to long (1997-08-06 10:21 will overflow. Why?) > Convert the decimals to double > 1997-07-31 15:33 gives you 34563813, 1997-08-06 10:21 gives you 34528941 > So we just proved that 1997-07-31 15:33 > 1997-08-06 10:21 I have "C" functions to accurately manipulate DateTime, Date, UNIX time_t, and struct tv formats and convert between if anyone needs them. These use no Informix library code and even handle dates outside of the normally supported ranges of these formats. Art S. Kagel