Login Register Actian.com  

Actian Community Forum



Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 2009-04-03   #1 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default Ingres date format

I have set up a linked server from an instance of sql server 2005 SP2 to an ingres database. The ingres client I have installed is ingres-3.0.2.105-GA-win32.

All works fine however the date format is yyyy.mm.dd, I need it to be dd.mm.yyyy. Do anyone no where this is changed?

Cheers
daniel2000 is offline   Reply With Quote
Old 2009-04-05   #2 (permalink)
Ingres Community
 
denjo02's Avatar
 
Join Date: Mar 2007
Location: Melbourne, Australia
Posts: 222
Default

I'm not 100% certain about what happens where SQL Server is concerned, but the format of dates in an Ingres client is controlled by the environment variable II_DATE_FORMAT. According to the SQL Reference Guide, setting II_DATE_FORMAT=GERMAN returns dd.mm.yyyy - I note that the System Administrators Guide suggests that "german" results in dd.mm.yy, but this is the setting you want.

The variable can be set locally, in each user's environment:
set II_DATE_FORMAT=GERMAN
or globally for every user on each Ingres client instances:
ingsetenv II_DATE_FORMAT GERMAN
denjo02 is offline   Reply With Quote
Old 2009-04-05   #3 (permalink)
Ingres Community
 
kschendel's Avatar
 
Join Date: Mar 2007
Location: Pittsburgh, PA
Posts: 2,055
Default

There's also a SET DATE_FORMAT SQL statement: SET DATE_FORMAT 'xxx' where 'xxx' is one of the keywords usable with the II_DATE_FORMAT variable. The effect is specific to the issuing session.

SET DATE_FORMAT used to be an undocumented secret; I'm not sure if it's in the latest manuals or not.

In your case I think you want II_DATE_FORMAT, since that affects all sessions.
kschendel is offline   Reply With Quote
Old 2009-04-06   #4 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default

Hi Thanks for your response. That seems to have resolved the issue. Just out of curiosity where is this variable stored? Because once I've set it where would I look to see if its set?

Cheers

Daniel
daniel2000 is offline   Reply With Quote
Old 2009-04-06   #5 (permalink)
Member
 
Join Date: Nov 2008
Posts: 30
Default

I believe typing ingprenv at the command line will show the II_DATE_FORMAT value.
sjand is offline   Reply With Quote
Old 2009-04-06   #6 (permalink)
Ingres Community
 
denjo02's Avatar
 
Join Date: Mar 2007
Location: Melbourne, Australia
Posts: 222
Default

If you have set the value locally, in each user's environment, you can see the setting with the "set" command. To reduce the amount of output to Ingres related things, you could type:

set | find "II"

If you use ingsetenv to set it globally, then it's visible with the ingprenv command (as previously pointed out), and is stored in the Ingres symbol table, which is the the file symbol.tbl found in the %II_SYSTEM%\ingres\files directory.
denjo02 is offline   Reply With Quote
Old 2009-04-06   #7 (permalink)
Ingres Community
 
Join Date: Mar 2007
Location: France Paris La Defense
Posts: 116
Default

Hello

If variable has been setted globally with
ingsetenv II_DATE_FORMAT GERMAN

you can check it with ingprenv command as already said
and in that case it's stored in file symbol.tbl ($II_SYSTEM/ingres/files)
but please don't edit this file manually as the result will be a corrupted file !

Regards.
magxa01 is offline   Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved