List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:October 1 1999 10:26am
Subject:Re: Yet Another Date Question
View as plain text  
On Thu, 1999-09-30 12:46:34 -0600, Sasha Pachev wrote:
> "Jay A. Johnson" wrote:
> > 
> > This should be easy, but I can't seem to find it in the manual:
> > I have a TIMESTAMP column in one table (a.when) and a DATE column
> > ( in another, and want to join the tables on these fields.
> > But "...where" doesn't work, and I can't find a
> > DATEOF(timestamp) function that returns the date part.  Right now
> > I'm using "... where DAYOFYEAR(a.when)=DAYOFYEAR(' as a
> > workaround, but that will break in about 360 days :-).  TIA
> Try converting both to some common denominator such as Unix seconds.

I suggest using TO_DAYS which works with both DATE and DATETIME

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Yet Another Date QuestionJay A. Johnson30 Sep
  • Re: Yet Another Date QuestionBob Kline30 Sep
  • Re: Yet Another Date Questionsasha30 Sep
    • Re: Yet Another Date QuestionMartin Ramsch1 Oct
Re: Yet Another Date QuestionJay A. Johnson1 Oct