Impossible to cast a Date into Datetime (DBF Uniprovider)
Posted: Wed 26 Dec 2018 15:35
Hi,
I am using DBF Uniprovider to read DBF database. I want to cast a Date field into a DateTime field to be able to read it using asDateTime function.
When I directly use the Date field without explicit conversion: works fine
SELECT a.date as newduedate FROM mytable a => ok (but it is not what I want)
When I explictly cast the Date field into DateTime : error "can't access to the field as DateTime"
SELECT CAST(a.date as datetime) as newduedate FROM mytable a => KO, not od DateTime type
I need to explicitly convert the field into DateTime because it will be the result of a CASE that I need to explicitly cast into DateTime for using asDateTime method.
If somebody can help me,
Thanks so much.
I am using DBF Uniprovider to read DBF database. I want to cast a Date field into a DateTime field to be able to read it using asDateTime function.
When I directly use the Date field without explicit conversion: works fine
SELECT a.date as newduedate FROM mytable a => ok (but it is not what I want)
When I explictly cast the Date field into DateTime : error "can't access to the field as DateTime"
SELECT CAST(a.date as datetime) as newduedate FROM mytable a => KO, not od DateTime type
I need to explicitly convert the field into DateTime because it will be the result of a CASE that I need to explicitly cast into DateTime for using asDateTime method.
If somebody can help me,
Thanks so much.