Subject Re: CAST() as TimeStamp / Date need in regional setting
Author Adam
--- In firebird-support@yahoogroups.com, Richard Wesley <hawkfish@...>
wrote:
>
>
> On 23 Nov 2007, at 23:52, Bhavbhuti Nathwani wrote:
>
> > I recently used CAST(tDt AS DATE) (TIMESTAMP field as DATE) in one of
> > my SELECT and the date came up as 2007-11-24,
>
> This is ISO format and is appropriate for the server.
>
> > is it possible to get
> > the date in the computer's regional setting for eg. 24/11/2007?

It has always puzzled me why folk try to ask how to get the server to
perform any data-type to string formatting. The same goes to using
CURRENT_TIMESTAMP etc. Perhaps I am the only one with users living in
different timezones who all want different display conventions ;)

All this achieves is to increase the data over-the-wire.

If you desperately want to perform server side conversions, you have
two choices.

1. Write/find a UDF
2. Use Cast(Extract(Day from ...) as varchar(2) || '/' ...... etc

Adam