Re: Manipulating datetime on 9.40.UC5
Posted in 2005
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
wanita wrote: > On 7.30.UC7 setting GL_DATETIME=%d-%m-%Y %H:%M:%S > changed a datetime format from > 2005-01-20 16:00:00 to 20-01-2005 16:00:00 but this does not work on > 9.40.UC5. How do I get a datetime variable to be dmy time instead of > ymd time - running on a Linux platform? Explain how you got it to work on 7.30.UC7. Was it an ESQL/C program, or DB-Access, or ... or what? Did you recompile anything when you changed to 9.40.UC5? TTBOMK, unless a program explicitly translates the strings into datetime variables (or vice versa) on the client side with the correct function(s), GL_DATETIME has no effect on anything. Further, the variable is pretty much useless in general -- there's no real way it can be successfully used to format all of DATETIME YEAR TO DAY (equivalent to ISO SQL 'DATE' type, but not directly equivalent to the IDS DATE type) and DATETIME HOUR TO MINUTE and DATETIME YEAR TO FRACTION(5), all at the same time. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
I think you may have missed Art's response and my subsequent e-mail.
Getting GL_DATETIME to work on 7.30.UC7 was easy - export the environment
variable and it worked in dbaccess and in straight 4GL code (compiled with
r4gl).
On 9.40.UC5 I am now working in a completely different environment, i.e.
Linux RedHat and Genero front end. Whilst the GL_DATETIME happily changes
the display in dbaccess it does not do likewise in Genero - obviously
Genero has something that is overriding this. And the only format of
DATETIME that I use is DATETIME YEAR TO MINUTE.
If nobody else here has come across this problem I shall do as Art has
suggested and take it to the 4JS team.