Subject Re: [firebird-support] Converting CURRENT_TIME to VARCHAR
Author Lester Caine
majstor wrote:
> Hello,
>
> I have an sql statement which is don't work:
>
> SELECT CAST(CURRENT_TIME AS VARCHAR(10)) FROM RDB$DATABASE
>
> maybe I'm craisy, but what is wrong???

SELECT SUBSTRING ( CURRENT_TIME from 1 for 10 ) FROM RDB$DATABASE

CURRENT_TIME is 13 characters long and CAST does not know how to trim it.

I'm normally just trimming to 5 characters to loose the seconds ;)

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk