Reported By: Helmut Woss Reported On: 10/26/2000 For: Version 2.04 Build 1
# 643CAST SQL and Filter Function Not Working Properly When Converting Dates to Strings I am working with the new version 2.04 and found an error with the CAST function.
1) Open DBSYS
2) Create a table with a field of type date and a field of type time
3) Insert a record with valid values
Now use sql-query and try:
select cast(datefield as char(8)) + " " + cast(timefield as char(8))
from testtable
The result is okay.
Now try:
select cast(datefield as char(5)) + " " + cast(timefield as char(5))
from testtable
the date string is 6 char long and the time string only 4 char
And this way:
select cast(datefield as char(9)) + " " + cast(timefield as char(7))
from testtable
gives the same result as the first query.
ResolutionFixed Problem on 10/28/2000 in version 2.05 build 1