Bug 4246

PowerBuilder 2019 - Inconsistent date retrieval, 30 June, 2020

Brad Woodfield
10 March, 2020
Product: PowerBuilder Category: DataWindow
Version: 2019 R2 Beta Build:
Classification: Appeon bug Publishing: Public
Priority: P3
Status: Verifying Reason:
armando herrera @Appeon 30 June, 2020
Hi Brad, 

I'm checking with you if the response provided to you was helpful enough to resolve
your case. If so, can we proceed to close this ticket?.
Otherwise, do let us know if we can provide you with any further assistance.

Also, please keep in mind, that you are always welcome to open another ticket in case you need it.

Mark Lee @Appeon 07 April, 2020
Hi Brad,

Good news that Appeon PowerBuilder 2019 R2 GA (build 2323) has been officially released. The issue you reported has been fixed in this release. Please download and install it to verify your reported issue and let us know if any problems.
You can get the installer from our Downloads portal at https://account.appeon.com/download/2019 (login required).
Upgrade Notes:
If you are currently using PowerBuilder/InfoMaker 2019 (build 2082 or 2170) or PowerBuilder/InfoMaker 2019 R2 Beta (build 2279), please directly apply this GA (build 2323) on the top of your current 2019 or 2019 R2 Beta.
We welcome all feedback from you!

Mark Lee
Mark Lee @Appeon 11 March, 2020
Hi Brad,

Thanks for reporting this problem.
We can reproduce it on our side in PB 2019 Build 2170 & PB 2019 R2 2279 but we don't have a suitable workaround for you at this moment. We will do further research to figure it out. We will keep you updated!

BTW, we found that it works well in PB 12.5 & PB 12.6. 

Mark Lee
Chris Pollach @Appeon 10 March, 2020
Hi Brad;

  Thank you for pointing out this inconsistency!

  I will now transfer this ticket over to our main Support / Engineering Team for their review and feedback on this issue!

  Thank you for all you time and help in testing the PB2018 R2 beta software!

Regards .. Chris
Brad Woodfield 10 March, 2020
When a datetime field has been created and assigned just a time value, we are seeing inconsistent values when retrieving it depending on the method of retrieval.     Previously in PB12.5 when you had a datawindow/dataset with a datetime field, and passed in just a time, you could retrieve the time value with a Null date. (i.e  ??/??/???? 23:59:00) regardless of the retrieval method.  

In Powerbuilder 2019 if you populate the datetime field with just a time; then retrieve using a .object notation (i.e. datawindow.object.field) you get the same result as previous; a datatime value with null date and the time populated; however if you use the GetItemDateTime() function you get a Null Exception Error. 

*Reproduce Steps:
1) Create a datawindow that includes a datetime field.
2) Assign a time value to that datetime field 
           dw_edit.SetItem(row, "dateField", time("12:00") )
3) Retrieve the value from the datetime field using both methods
           dw_edit.GetItemDateTime(row, "dateField")

The concern isn't just the Null Exception, it's the inconsistency in how the two different methods react. We're wondering if the .Object is incorrect, or the GetItemDateTime() is incorrect.  We're now going through and scanning out applications looking for possible instances of a Null Date.
Windows 10
Database Type:
Microsoft SQL Server
Database Version: