IBM Support

IT33777: BUILD IN FUNCTION "DATE_PART" MIGHT RETURN AN INCORRECT RESULT OF WEEK, I.E. DATE_PART('WEEK', '2020-03-09')

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Build in function date_part will return an incorrect result in
    some cases while calculating the number of week. 
    
    For example, '2020-03-09' & '2020-03-12' should be in the same
    week, but the date_part ('WEEK') output is different. 
    
    $ db2 "values date_part('WEEK', '2020-03-09')"
    1
    --------------------
    10
    1 record(s) selected.
    
    $ db2 "values date_part('WEEK', '2020-03-10')"
    1
    --------------------
    10
    1 record(s) selected.
    
    $ db2 "values date_part('WEEK', '2020-03-11')"
    1
    --------------------
    11
    1 record(s) selected.
    
    $ db2 "values date_part('WEEK', '2020-03-12')"
    1
    --------------------
    11
    1 record(s) selected.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * all                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.5.6                                        *
    ****************************************************************
    

Problem conclusion

  • Upgrade to Db2 11.5.6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT33777

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-08-04

  • Closed date

    2021-06-14

  • Last modified date

    2021-06-23

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IT37857

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB50 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.5","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 December 2021