dbTalk Databases Forums  

Re: [Info-ingres] [Rookie] Problem with date

comp.databases.ingres comp.databases.ingres


Discuss Re: [Info-ingres] [Rookie] Problem with date in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
martin.bowes@ctsu.ox.ac.uk
 
Posts: n/a

Default Re: [Info-ingres] [Rookie] Problem with date - 03-27-2006 , 04:27 AM






Hi Radosaw,

You need to look at the settings of the environment variable
II_DATE_FORMAT. This is documented in the SQL reference guide.
There is a table of the various permitted input formats, and output
formats.

The default date format is 'US', but you may set alternatives as follows.

At an installation wide level using ingsetenv. You can display the
current installation setting with ingprenv II_DATE_FORMAT.

You can also set the environment variable for a specific job or session.
This 'local' setting would then override the installation setting - for the
lifetime of the session/job or until this local setting is altered or cleared.

In your case, you could use:

setenv II_DATE_FORMAT DMY
sql iidbdb
select date('27-03-2006 10:22:01');\g
\q

The system will respond with a date in DMY 'output' format of:
dd-mmm-yyyy

Martin Bowes
Quote:
Hi,
I have been using Ingres r3 3.0.2.105 on Windows.
I have little problem with date. I would like to insert
date in format 'yyyy-mm-dd hh:mm:ss' but I do not know
how to set it. Please help becuse I do not know waht to do, I was
searching in documentation but I can not find any clue.

Regards
Radoslaw Witkowicki


_______________________________________________
Info-ingres mailing list
Info-ingres (AT) cariboulake (DOT) com
http://mailman.cariboulake.com/mailm...py/info-ingres




Reply With Quote
  #2  
Old   
Radoslaw Witkowicki
 
Posts: n/a

Default Re: [Info-ingres] [Rookie] Problem with date - 03-27-2006 , 05:46 AM






Hi Martin,
This is it. Thans a lot. I own you pretty big beer .

Regards
Radoslaw Witkowicki
<martin.bowes (AT) ctsu (DOT) ox.ac.uk> wrote

Quote:
Hi Radosaw,

You need to look at the settings of the environment variable
II_DATE_FORMAT. This is documented in the SQL reference guide.
There is a table of the various permitted input formats, and output
formats.

The default date format is 'US', but you may set alternatives as follows.

At an installation wide level using ingsetenv. You can display the
current installation setting with ingprenv II_DATE_FORMAT.

You can also set the environment variable for a specific job or session.
This 'local' setting would then override the installation setting - for
the
lifetime of the session/job or until this local setting is altered or
cleared.

In your case, you could use:

setenv II_DATE_FORMAT DMY
sql iidbdb
select date('27-03-2006 10:22:01');\g
\q

The system will respond with a date in DMY 'output' format of:
dd-mmm-yyyy

Martin Bowes
Hi,
I have been using Ingres r3 3.0.2.105 on Windows.
I have little problem with date. I would like to insert
date in format 'yyyy-mm-dd hh:mm:ss' but I do not know
how to set it. Please help becuse I do not know waht to do, I was
searching in documentation but I can not find any clue.

Regards
Radoslaw Witkowicki


_______________________________________________
Info-ingres mailing list
Info-ingres (AT) cariboulake (DOT) com
http://mailman.cariboulake.com/mailm...py/info-ingres






Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.