By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

Date format question

P: n/a
I have been reading the IBM DB2 manuals and looking through this group
and can't seem to find any information on how to format the date for
individual users. I understand that by default the date will be
displayed based on the Territory where the database is installed and
that using the bind command you can overide this but it appears to be a
database level solution.

Is there an environment variable equivalent to the Informix DBDATE or
Oracle NLS_DATE_FORMAT that will format the date on the user level?

Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Adman wrote:
I have been reading the IBM DB2 manuals and looking through this group
and can't seem to find any information on how to format the date for
individual users. I understand that by default the date will be
displayed based on the Territory where the database is installed and
that using the bind command you can overide this but it appears to be a
database level solution.

Is there an environment variable equivalent to the Informix DBDATE or
Oracle NLS_DATE_FORMAT that will format the date on the user level?

On the server a date is a date is a date.
When a date is bound out on the client into a string, to the best of my
knowledge the display depends on the client settings.
If you could be more specific on what your problem is....

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

P: n/a
Serge,

Thank you for responding. Unfortunately I feel like I do not have the
vocabulary to explain exactly what I am looking for so I thought I
would give an example of the select process I did in our Informix
environment.

Column ord_rels_dt is defined as a date column.

1. select ord_rels_dt from iord

06/17/2003
07/29/2003
07/23/2003

2. export DBDATE=DMY4-

3. select ord_rels_dt from iord

17-06-2003
29-07-2003
23-07-2003

Nov 12 '05 #3

P: n/a
Adman wrote:
Serge,

Thank you for responding. Unfortunately I feel like I do not have the
vocabulary to explain exactly what I am looking for so I thought I
would give an example of the select process I did in our Informix
environment.

Column ord_rels_dt is defined as a date column.

1. select ord_rels_dt from iord

06/17/2003
07/29/2003
07/23/2003

2. export DBDATE=DMY4-

3. select ord_rels_dt from iord

17-06-2003
29-07-2003
23-07-2003

"DateTimeStringFormat CLI/ODBC configuration keyword"
http://publib.boulder.ibm.com/infoce...6d%61%74%22%20
It's part of the cli.ini configuration file on the client
I'm not sure whether teh client has a way to set it within a session.
But you can have different formats for different clients.

Cheers
Serge

PS: I'm no expert on the client side. So you'll need to dig from here or
hope someone else picks thsi thread.
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4

P: n/a
"Adman" <ad*******@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Serge,

Thank you for responding. Unfortunately I feel like I do not have the
vocabulary to explain exactly what I am looking for so I thought I
would give an example of the select process I did in our Informix
environment.

Column ord_rels_dt is defined as a date column.

1. select ord_rels_dt from iord

06/17/2003
07/29/2003
07/23/2003

2. export DBDATE=DMY4-

3. select ord_rels_dt from iord

17-06-2003
29-07-2003
23-07-2003

Look at the CHAR function in the SQL Reference manual.
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.