Hi Krishna, If it only happens occasionally and not consistently there must be date time/timestamp values that choke on the retrieve or fetch. One fix could be to cast the timestamp to a string value, then you can fish out the date. ASE has a Convert function:
select convert ( char(10) , dtcolumn , 120 ) into :ls_date from ....
// ls_date now contains the date part in yyyy-mm-dd format.
ld_date = date ( ls_date )