cast(... as date) returns a timestamp instead of a date

9 views
Skip to first unread message

sanoso...@gmail.com

unread,
Apr 15, 2021, 10:24:26 AM4/15/21
to firebird-support
Hi,

cast(... as date) returns usually a date, but on a particular notebook it returns a timestamp! I don't understand what's different about this notebook.

Dimitry Sibiryakov

unread,
Apr 15, 2021, 10:27:30 AM4/15/21
to firebird...@googlegroups.com
15.04.2021 16:24, sanoso...@gmail.com wrote:
> cast(... as date) returns usually a date, but on a particular notebook it returns a
> timestamp! I don't understand what's different about this notebook.

Database or query with dialect 1.

--
WBR, SD.

Mark Rotteveel

unread,
Apr 15, 2021, 10:40:16 AM4/15/21
to firebird...@googlegroups.com
You're either using a dialect 1 database, or you're connecting to a
dialect 3 database with dialect 1 as connection dialect. In dialect 1, a
DATE is actually a date+time (aka TIMESTAMP in dialect 3).

Mark
--
Mark Rotteveel

sanoso...@gmail.com

unread,
Apr 15, 2021, 11:00:51 AM4/15/21
to firebird-support
Someone changed the dialect in the odbc data source. Thanks!
Reply all
Reply to author
Forward
0 new messages