Subject Re: [ib-support] Date Format in FireBird
Author Pavel Cisar
Hi,

On 23 Apr 2003 at 14:28, desmondtay88 wrote:

> Probably this had been posted couple of times in this forum, but im
> pretty new to firebird and need some help. Seems like by default the
> db is taking mm-dd-yy as the format for date input. Wondering how
> can I change this to dd-mm-yy format instead. im running on win98,
> tried changing the system short date format, but doesnt help. also
> im accessing the db thro' perl. i've tried $dbh->{ib_dateformat} = %
> d-%m-%y. it helps on the output, but for input it is still expecting
> mm-dd-yy.

Formats for date literals in IB/FB are as follows:

CCYY-MM-DD
MM-DD-CCYY or MM-DD-YY
MMM-DD-CCYY or MMM-DD-YY
DD-MMM-CCYY or DD-MMM-YY
CCYY-MM-DD HH:Min:SS:nnnn
MM-DD-CCYY HH:Min:SS:nnnn or MM-DD-YY HH:Min:SS:nnnn
MMM-DD-CCYY HH:Min:SS:nnnn or MMM-DD-YY HH:Min:SS:nnnn
DD-MMM-CCYY HH:Min:SS:nnnn or DD-MMM-YY HH:Min:SS:nnnn

CC = century
YY = year
MM = month
DD = day
HH = hour
Min = minutes
SS = seconds
nnnn = miliseconds

As segment delimiter you can use hyphen "-", slash "/", dot ".", stroke
"',", colon ":" or space " ".

IB/FB recognizes both american (MM/DD) and european (DD.MM) notation for
dates. Notation is recognized by used separator. For european notation
use dot (excluding pattern with century at the beginning), for american
notation use all other separators instead dot.

Best regards
Pavel Cisar

See you at the First European Firebird Conference in May in Fulda,
Germany
http://www.firebird-conference.com

http://www.ibphoenix.com
For all your upto date Firebird and
InterBase information