home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC70747 Status: Closed

VARCHAR_FORMAT INCORRECTLY RETURNS MERIDIAN PM AND DATE WHEN HOUR COMPONENT
IN THE TIMESTAMP VALUE IS THE BOUNDARY CASE 24.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
When the VARCHAR_FORMAT function requests the hour be returned 
using HH or HH12 and meridian is also requested, it fails to 
handle the time component value of 24.00.00 correctly. It 
incorrectly returns this as 12:00:00 PM of the same day instead 
of 12.00.00 AM of the next day. 
 
The following query differs in that the 2nd is noon expressed as 
12.00.00 and the 3rd row is the very end of the day expressed as 
24.00.00. the fourth row illustrates a workaround to get the 
correct answer using HH or HH12 
            values varchar(timestamp '2010-02-03-24.00.00'), 
                      varchar_format(timestamp 
'2010-02-03-12.00.00','yyyy/mm/dd hh12:mi:ss AM'), 
                      varchar_format(timestamp 
'2010-02-03-24.00.00','yyyy/mm/dd hh12:mi:ss AM'), 
                      varchar_format(timestamp 
'2010-02-03-24.00.00'+0 seconds,'yyyy/mm/dd hh12:mi:ss AM') 
 
Incorrect results for the queries above are: 
2010-02-03-24.00.00 
2010/02/03 12:00:00 PM 
2010/02/03 12:00:00 PM 
2010/02/04 12:00:00 AM 
 
Expected (correct) results for the queries above are: 
2010-02-03-24.00.00 
2010/02/03 12:00:00 PM 
2010/02/04 12:00:00 AM 
2010/02/04 12:00:00 AM
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users of varchar_format function.                            * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* When the VARCHAR_FORMAT function requests the hour be        * 
* returned using HH or HH12 and the meridian is also           * 
* requested, it fails to handle the time component value of    * 
* 24.00.00 correctly. It incorrectly returns this as 12:00:00  * 
* PM of the same day instead of 12.00.00 AM of the next day.   * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to v97FP4 to obtain fix.                             * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Fixed in v97FP4.
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC71363 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
24.08.2010
28.04.2011
28.04.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP4
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.4 FixList