Hi Bhavbhuti,

I do not know the exact solution, but I'd say:

> COALESCE(CAST(tPB.dBillDt AS TIMESTAMP), '') AS tDocDt

converts timestamp inside servers environment to a string - the
returning client receives a string and does not know about it's datatype
- yet does not a apply specific translations.

With

> CAST(COALESCE(tPB.dBillDt, '') AS TIMESTAMP) AS tDocDt

it's just the other way round: While the server deals with string and
timestamp, the client receives a timestamp an does know what to with it.

I'd say, this behavior is expectable...

Best regards, Thomas

Am 10.05.2014 15:21, schrieb [email protected] [firebird-support]:
>  
> 
> Hi all
> 
> I have the following in my SELECT statement
> 
> COALESCE(CAST(tPB.dBillDt AS TIMESTAMP), '') AS tDocDt
> 
> The COALESCE() converts the CAST()ed TIMESTAMP to ANSI standard
> 2014-05-03 00:00:00.0000
> 
> 
> 
> CAST(COALESCE(tPB.dBillDt, '') AS TIMESTAMP) AS tDocDt
> 
> The CAST() converts the COALESCE()ed TIMESTAMP to my regional and
> expected format 03.05.2014, 00:00:00.0000
> 
> 
> Is this an expected behavior?  Please advise.
> 
> Thanks and regards
> Bhavbhuti

-- 
Mit freundlichen Grüßen,

Thomas Beckmann
Diplom-Informatiker


Wielandstraße 14c • 23558 Lübeck
Tel +49 (22 25) 91 34 - 545 • Fax +49 (22 25) 91 34 - 604
Mail [email protected] <mailto:[email protected]>

ASSFINET-Logo

*ASSFINET Dienstleistungs-GmbH*
Max-Planck-Straße 14 • 53501 Grafschaft bei Bonn
[email protected] <mailto:[email protected]> • www.assfinet.de
<http://www.assfinet.de/>

Geschäftsführer: Dipl. Wirtschaftsinformatiker Marc Rindermann
Registergericht Koblenz HRB 23331

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
nicht gestattet.

Reply via email to