Re: question about SQL ANSI dates
Posted in 1993
>From: uunet!world.std.com!smayo (Scott A Mayo) >Subject: question about SQL ANSI dates >Date: Tue, 16 Mar 1993 19:44:24 GMT >X-Informix-List-Id: <news.2841> >Just a sanity check: in SQL queries, are datetimes formatted as >"yyyy-mm-dd hh:MM:ss"? Yes. >I need to choose a format that virtually everything on Earth will >support. Users don't like it, but it is at least unambiguous, and it sorts into date order using a straight lexicographic sort. >Also, does Informix specifically (or ANSI SQL in general) make >provision for timezone information in datetimes? Under 5.00 at any rate, it seems that the datetime value of current is returned relative to the local timezone defined by the TZ environment variable in the engine. I haven't checked what happens when you work with a database in California from a machine in London. My recollection of 4.00 is that I could not make head or tail of the timezone behaviour -- it did respond to TZ (because the values on Californian machines were consistent with California time, and the values in London were consistent with London time), but I couldn't persuade it to do so consistently by changing TZ in my application/engine environment. Whether that meant that it reported CURRENT using the TZ of tbinit or something else, I don't know. There is no provision for timezone information in the DBTIME environment variable. I don't know what the standard says. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>