If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Date representation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-20-03, 15:39
mgupta mgupta is offline
Registered User
 
Join Date: Oct 2003
Posts: 80
Date representation

Wer are on AIX 4.33, UDB 7.2 Fixpack 10.

When I select a date field thru AIX, it shows in MM/DD/YYYY format.
The same date shows correctly in YYYY-MM-DD format thru Control Center GUI or Quest Central...

what should be changed in AIX to fix this ??
Reply With Quote
  #2 (permalink)  
Old 11-20-03, 16:15
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: Date representation

Quote:
Originally posted by mgupta
Wer are on AIX 4.33, UDB 7.2 Fixpack 10.

When I select a date field thru AIX, it shows in MM/DD/YYYY format.
The same date shows correctly in YYYY-MM-DD format thru Control Center GUI or Quest Central...

what should be changed in AIX to fix this ??
As far as I understand the date is formatted by default using the database locale setting. You can use CHAR(date_field, ISO) to ensure consistent formatting.
Reply With Quote
  #3 (permalink)  
Old 11-20-03, 16:22
mgupta mgupta is offline
Registered User
 
Join Date: Oct 2003
Posts: 80
the CHAR(date_field, ISO) does show it in ISO so it helps.

But how can I set the database locale setting or somewhere in db2set to make this permanent...

thanks again
Reply With Quote
  #4 (permalink)  
Old 11-20-03, 17:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally posted by mgupta
the CHAR(date_field, ISO) does show it in ISO so it helps.

But how can I set the database locale setting or somewhere in db2set to make this permanent...

thanks again
I believe you have to specify the necessary locale at the database creation time:

CREATE DATABASE ... USING CODESET ... TERRITORY ...
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On