Subject Re: [firebird-support] TimeStamp Format
Author Helen Borrie
At 09:18 AM 20/10/2005 -0400, you wrote:
>Dear All,
>Is there a way to setup the Timestamp format in the database
>( hh:mm:ss).
>besides what's the format for timestamp by default?

There is no "format" that anyone would recognise as a date/time: timestamp
is stored as a composite number.

>I'm the application I'm working I've seen the format changes if I used
>in different operating systems, can this happen or just my mistake?

Client applications format timestamp values. What you see depends on how
your application environment displays them. Windows has its own rules for
date formats in locales, that some applications use and others don't. In
Linux, KDE and Gnome have locale format settings that might or might not be
reflected in a particular application. ISQL has a standard output format
for date/time types that varies according to whether you are running it on
Windows or Linux....and so on.

If you are working with the raw API, there are some encoding/decoding
functions you can call to format the output. Higher level interfaces
usually perform the encoding and decoding for you, e.g. Delphi components
usually convert a Timestamp to a TDateTime and functions like
FormatDateTime are therefore available.

Going in the other direction (input), Firebird has its own rules for how it
interprets date/time literal strings that you pass to it; for example (and
there are many), the timestamp literal '12/08/2005 23:15:30.5555' will
store the equivalent of "8th December...." while '12.08.2005 23:15:30.5555'
will store the equivalent of "12th August...." and '25/12/2005
23:15:30.5555' will return an exception.