datetime format woes
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Internationalization & Character Sets
The crux of my problem is that I need to print datetime values in a format different to the default. The client is a perl script+odbc running on WinNT, the server is Dynamic Server 7.30 also on WinNT. First I tried the client side. I used several ODBC drivers (Informix 2.80/3.3, Intersolve 3.01) and setting environment variables GL_DATETIME, DBTIME ( via SETNET32 and also in the DOS box) but to no avail. Next I tried the server side via the SERVER_LOCALE environment variable. Here the problem is How Do I Set It? The book says via SETNET32 but my SETNET32 doesn't display any SERVER_LOCALE nor does it offer me a way to add it. I tried saving variables to a file, editing and reloading but it ignores SERVER_LOCALE. I also added to the registry via regedit, but it still gets ignored. All help gratefully received. Sent via Deja.com http://www.deja.com/ Before you buy.
>Subject: datetime format woes >From: david_henry@my-deja.com >Date: 02.05.00 08:18 W. Europe Daylight Time >Message-id: <8elrul$3nm$1@nnrp1.deja.com> > >The crux of my problem is that I need to print datetime values in a >format different to the default. >The client is a perl script+odbc running on WinNT, the server is Dynamic >Server 7.30 also on WinNT. >First I tried the client side. I used several ODBC drivers (Informix >2.80/3.3, Intersolve 3.01) and setting environment variables >GL_DATETIME, DBTIME ( via SETNET32 and also in the DOS box) but to no >avail. >Next I tried the server side via the SERVER_LOCALE environment variable. >Here the problem is How Do I Set It? The book says via SETNET32 but my >SETNET32 doesn't display any SERVER_LOCALE nor does it offer me a way to >add it. I tried saving variables to a file, editing and reloading but it >ignores SERVER_LOCALE. I also added to the registry via regedit, but it >still gets ignored. >All help gratefully received. > > > >Sent via Deja.com http://www.deja.com/ >Before you buy. > > for columns of type date, use GL_DATE for columns of type datetime year to second..., use GL_DATETIME. You set GL_DATE, GL_DATETIME on the client only. The server just delivers the raw column without formatting it. Nona p.s. SERVER_LOCALE is only for writing messages to the online.log