Re: dates B.C.
Posted in 1996
>
> In article <4hv3t1$o2r@accursio.comune.bologna.it>
> ret2519@iperbole.bologna.it "Giorgio Bignozzi" writes:
>
> > How can I use a date value to store a date Before Christ ?
> > Please don't suggest to use a flag !
>
> I havn't tried this myself but as Informix stores dates as some kind of
> integer value I would suspect this is NOT a problem so long as your
> DBDATE is set to 'DMY4' (I'm in the UK!) not 'DMY2'. I would
> test this with a basic PERFORM screen. 31/Dec/1899 (or is it
> 01/Jan/1900?) are stored as zero. Dates before this are stored as
> negative numbers, dates after as positive ones - hence the ability
> do do arithmetic on dates.
>
> Hope this helps!
Ok, but how do you enter them? -03/15/0044 (sorry Julius) doesn't go in on
a sperform form. I've tried a number of combinations of a negative sign and
any of those fields. All choke - invalid date.
Ok, so:
create table junk (dtfld DATE);
insert into junk values ("01/01/0001");
select * from junk;
dtfld
01/01/0001 -- so far so good.
update junk set dtfld = dtfld - 1 units day;
519: Cannot update column to illegal value.
(I also tried this with - 44 units year - to get over any conceptual problems
of year '0' - same result).
I get more and more curious. based on this evidence I would venture to say
that Informix does not support BC dates. Still - I've been wrong once or
twice before.....
cheers
j.
_____________________________________________________________________________
Jack Parker - Hewlett Packard, DMD/IS Boise, Idaho, USA
jparker@hpbs3645.boi.hp.com
_____________________________________________________________________________
If anything can go wrong, fix it. To hell with Murphy.
_____________________________________________________________________________
Any opinions expressed herein are my own and not those of my employers.
_____________________________________________________________________________