Subject | Re: [firebird-support] Fundamental of DATE type |
---|---|
Author | Clausheeg |
Post date | 2003-09-12T07:37:38Z |
Dear Helen !
I am afraid you may have made a mistake in last examples...
I checked the date thing and I found it a bit different to your
statement....
FB1 no special dialect using isql ....
<<< If you use '9.1.2003' the date will be as 1-SEP-2003. >>>
this is ( table: dtest dt date) stored :
insert into dtest (dt) values ('9.1.2003') --->>>>> 09 Jan 2003 not
1-sep-2003
insert into dtest (dt) values ('9/1/2003') --->>>>> 01-Sep-2003
other examples....
insert into dtest ( dt ) values ('9/13/2003') ---> 13 Sept 2003
insert into dtest (dt) values ('13.09.2003') ---> 13 sept 2003
insert into dtest (dt) values ('13-09-2003') -- conversion error string
insert into dtest (dt) values ('09-13-2003') -- 13 Sept 2003
kind regds
Claus Heeg
I am afraid you may have made a mistake in last examples...
I checked the date thing and I found it a bit different to your
statement....
FB1 no special dialect using isql ....
<<< If you use '9.1.2003' the date will be as 1-SEP-2003. >>>
this is ( table: dtest dt date) stored :
insert into dtest (dt) values ('9.1.2003') --->>>>> 09 Jan 2003 not
1-sep-2003
insert into dtest (dt) values ('9/1/2003') --->>>>> 01-Sep-2003
other examples....
insert into dtest ( dt ) values ('9/13/2003') ---> 13 Sept 2003
insert into dtest (dt) values ('13.09.2003') ---> 13 sept 2003
insert into dtest (dt) values ('13-09-2003') -- conversion error string
insert into dtest (dt) values ('09-13-2003') -- 13 Sept 2003
kind regds
Claus Heeg
----- Original Message -----
From: Helen Borrie <helebor@...>
To: <firebird-support@yahoogroups.com>
Sent: Friday, September 12, 2003 6:33 AM
Subject: Re: [firebird-support] Fundamental of DATE type
> At 11:06 AM 12/09/2003 +0700, you wrote:
> >Hello,
> >
> >I have a problem here, I have inserted a lot of record into my table from
> >many processes which is one of it's field is a DATE type. The problem is
> >about the DD and MM formatting, I am inserting using this Syntax
> >
> >Insert Into TABLE (dtreceive, price, ID) values ('9/1/2003', 23000, 2);
> >
> >I mean convert the date data from a String '9/1'2003' to input in
> >MM/DD/YYYY format, but a lo of the data is reversed in DD/MM/YYYY.
>
> If you use the date literal format '9/1/2003' the date will be as
9-JAN-2003.
> If you use '9.1.2003' the date will be as 1-SEP-2003. There is no
> possibility that it works sometimes one way and sometimes another, as
long
> as the SQL receives the correct date literal.
>
> However, if you are using Windows and have an application interface whose
> date data you are converting, your own decoding algorithm can mess things
> up if your windows locale settings provide a short date format of
> dd/mm/yyyy. A person can go insane trying to hassle with the date
> conversion functions provided in Delphi, for example.
>
>
> >I want to know how's the most efficien way to input into the table so I
> >will never worry about the format sequences again.
>
> Like Alan suggests, stick with a literal format that doesn't risk this
> confusion. 01-sep-2003 works well (case doesn't matter) or ISO formats
> YYYYMMDD or YYYY-MM-DD.
>
> heLen
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>