Subject Re: [firebird-support] Context variables
Author Nick Upson
In article <NBBBJKLIEJPCMJJOFDNPIEHMHLAA.alan@...>, Alan McDonald
wrote:
> > d_from is timestamp in dialect3 database inside an SP
> >
> > d_from = '31.12.2004 13:45:17';
> > d_from = CAST(CAST (d_from AS VARCHAR(11)) as DATE);
> >
> > gives truncation error (I want just the date portion of the
> > initial contents)
> >
> > --
> > Nick
>
> what about CAST (d_from AS DATESTAMP)

dialect 3

d1 = '31.12.2004 13:45:17';
d1 = CAST (d1 AS timeSTAMP); - gives no effect

d1 = '31.12.2004 13:45:17'; - chops time section off - d1 = '31.12.2004'
d1 = CAST (d1 AS DATE);

dialect 1 won;t work however.

--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly