variable date precision
variable date precision
От:
christoph.dellavalle@goetheanum.ch
Дата:
hi there i've got a problem with a field set up as type date. now we discovered that we have to allow not only full dates (2003-10-16) but also dates where we have only a month or even a year. we see that it is not a very good practice to use the first of the month because it is ambiguous. on the other side, date does not allow entries like "2003-10-00". this db already contains quite a few records, so i'm not really keen on changing the data-type. nevertheless, i'm interested in the theoretically correct solution as much as in a practical one, since it is not the first time i've come across this problem. any suggestions are very welcome... chris
Re: variable date precision
От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Thu, Oct 16, 2003 at 08:07:01 +0200, christoph.dellavalle@goetheanum.ch wrote: > hi there > > i've got a problem with a field set up as type date. now we discovered that we have to allow not only full dates (2003-10-16) but also dates where we have only a month or even a year. we see that it is not a very good practice to use the first of the month because it is ambiguous. on the other side, date does not allow entries like "2003-10-00". > > this db already contains quite a few records, so i'm not really keen on changing the data-type. nevertheless, i'm interested in the theoretically correct solution as much as in a practical one, since it is not the first time i've come across this problem. > > any suggestions are very welcome... How are you going to use the incomplete dates? When you say only a month do you mean that there is also no year specified? One option is to pick an approximate day within a month and/or month within a year. Another option is to use another column which indicates a precision for the date.