IBM Support

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

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

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

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.5"}]

Document Information

Modified date:
03 August 2021