473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Date format question

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
4 3068
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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
4
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
6
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
2
by: syntego | last post by:
We commonly use triggers to log changes to our main tables to historical log tables. In the trigger, we create a concatenated string of the old values by casting them as follows: ...
10
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a...
9
by: Martin | last post by:
I'm retrieving some records from a database. One of the fields contains a date/time. I would like to format it as I send it out to the table in the displayed page. Can some one please tell me...
5
Stang02GT
by: Stang02GT | last post by:
I have been asked to validate a date on our web-page so that people cannot enter dates like 14/1/08 or 2/30/06. I have found code that will do exactly what i need it to do, but i am not sure how to...
6
by: Mtek | last post by:
Hi, We have a form where the user selects a date from a calendar, the date is in the format May 23, 2008. The date in the datebase is in the format 05212008. What we need to do is get the...
4
by: OzNet | last post by:
I have some functions to calculate the working days in a given period. This includes a table that is queried to calculate the number of public holidays that don’t occur on a weekend. If I test...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.