- siddharth agashe
- PowerBuilder
- Friday, 18 August 2017 01:52 PM UTC
Seeing different results on datetimes returned by reference from ASE 16 Stored procedures.
When the time stamp is 00:00:00, the procedures returns 12 AM (00:00:00) from PB, but 12 PM (12:00:00) from Appeon. This can cause issues when dates are compared.
Example Proc:
create PROCEDURE dbo.test_p ( @effective_date datetime = null output)
as
begin
set @effective_date = '3/1/13'
end
go
GRANT EXECUTE ON dbo.test_p TO public
Example PB Code:
datetime ldt_effective
sqlca.test_p(ldt_effective)
if sqlca.sqlcode 0 then
messagebox( string(sqlca.sqlcode), sqlca.sqlerrtext )
else
Messagebox( 'mar 1, 2013 00:00:00', string( ldt_effective ) )
end if
RPC Delcaration:
function long test_p(ref datetime effective_date) RPCFUNC ALIAS FOR "dbo.test_p"
PB Results:
-
- 3/1/13 00:00:00 (midnight)
Appeon Results:
-
- 3/1/13 12:00:00 (noon)
I have tried hardcoding the date in appeon but it is not the right way for the solution.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.