HARLIBRA
asked on
select error:syntax error during explicit conversion of varchar value '11-13-200723:59:59' to a datetime field
This a datawindow sql for a report.It looks like somehow the date conversion code we have in the query is concatenating the date/time correctly in some cases and others it doesnt work and we get no space between them. It happens when we enter dates greater than 11/10/2007 for the to-date
I was thinking of padding a space to the beginning of the time fields hardcoded in the SQL.
What you guys think.
I was thinking of padding a space to the beginning of the time fields hardcoded in the SQL.
What you guys think.
select .....
where
(itemhst.crdtstmp >= convert(datetime,convert(varchar(10),:a_da_fromdate) + '00:00:00')) and
(itemhst.crdtstmp <= convert(datetime,convert(varchar(10),:a_da_todate) + '23:59:59'))
crdtstmp is a datetime field. The database is Sybase ASE 12.5. Powerbuilder ver 9
datawinerror.bmp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Regards,
Bill