Subject Re: [firebird-support] Adding time to date
Author Martijn Tonies
> How to add TIME part do DATE in SELECT query? i am using FB 1.0.3.
> dialect 1.
>
>
> I have tried:
> select
> CAST(extract(day from MyField)||'.'||extract(month from
> MyField)||'.'||extract(year from MyField) ||' 00:00:00'|| as date) as

CAST( ( extract(day from MyField)||'.'||extract(month from
MyField)||'.'||extract(year from MyField) ||' 00:00:00' ) as date) as



> MyField
> from MyTable
>
> 00:00:00 is the time I wan't to add.
> but this gives me "General SQL error token unknown As".
>
>
> using just
> select
>
> CAST(extract(day from lopp)||'.'||extract(month from
> lopp)||'.'||extract(year from lopp) ||' 00:00:00' as date) as lopp
> from toopaev
>
> gives me only date, but does not have time part.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com