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.
Thanks for your response , we tried to implement it by the following command:
ls_date = string(DateTime(ldt_eff_date), 'YYYY/MM/DD HH:MM:SS:TTTT')
It only gives the time as 00:00:00 irrespective of time.
Am I missing on something.
Thanks for your response , we tried to implement it by the following command:
ls_date = string(DateTime(ldt_eff_date), 'YYYY/MM/DD HH:MM:SS:TTTT')
It only gives the time as 00:00:00 irrespective of time.
Am I missing on something.