Subject | Re: [firebird-support] Context variables |
---|---|
Author | Ivan Prenosil |
Post date | 2005-03-14T13:04:13Z |
> From: "Dimitry Sibiryakov"Normally no, but if it is part of converting from Timestamp/Date to (Var)Char
> On 14 Mar 2005 at 13:33, Ivan Prenosil wrote:
>
>>To strip-off time portion from timestamp, you have to convert
>>string 'NOW' to timestamp, get first 11 characters,
>>then convert it back. This will work in both dialects:
>> CAST(CAST(CAST ('NOW' AS DATE) AS VARCHAR(11)) AS DATE)
>
> AFAIK, CAST cannot truncate string. You'll get 'String truncation'
> error, no?
then it works - just try it. (it is for compatibility reasons with older IB)
Ivan