On Tue, Dec 02, 2003 at 10:27:04AM +0100, Christoph Haller wrote:
> As far as I know these results are correct in terms of the underlying
> C-library function mktime(). This function is intended to be used when
> adding/subtracting intervals from a given timestamp.
Which one? mktime() or to_date()? I'm not sure it's handy to use
to_date() for any calculations, so I'm surprised why doesn't it work
just as date_in() do.
> I don't know of any postgres function doing the check you're looking for.
Yes, the only thing I could think now is to do something like
s/([0-9]+)\.([0-9]+)\.([0-9]+)/\3-\2-\1/ and then pass it to
CAST(... AS date) using ISO DateStyle.
(I could simply use German DateStyle in case of DD.MM.YYYY, but I deal
with several date formats, e.g. DD/MM/YYYY.)
> But I can't believe this is the first time this topic is brought up.
> You may search the archives on "date plausibility" are related terms.
I'm sure too, but it's really hard to find a good keyword sequence when
searching such sort of things :(
Anyway, thank you for attention.
--
Fduch M. Pravking