Peter,
You missed the point. If you look at the example I gave, I wanted to add 14
days, then compare the resulting *date* to a date.
And I found a solution: select * from tablename where date_add(timestampcol,
INTERVAL 14 DAY) <= 'yyyy-mm-dd'
Works like a champ. And I could care less about Oracle and MSSQL.
-Lew
-----Original Message-----
From: Peter Carter <peterc@stripped>
To: Lew Barnesson <lewb@stripped>
Cc: win32@stripped <win32@stripped>
Date: Thursday, June 03, 1999 4:55 PM
Subject: Re: function to use in where clause to compare yyyymmdd with a
timestamp
>You are asking for trouble. Timestamps are designed for change referances
>on records, and may not even be anything that resembles time (look at
>oracle and M$SQL). Their purpose is not to give an end user what time the
>record has been updated, but to tell if the record HAS been updated at all.
>
>Although you can find a solution for MySQL, be aware that you have just
>locked yourself into MySQL. It's not portable, it could change at any time,
>it is not good.
>
>At 04:16 PM 6/3/99 -0700, you wrote:
>>Hi all,
>>
>>I need to do something like:
>>
>> select * from tblname where timestamp+14 <= '1999-06-30'
>>
>>Any suggestions? TIA.
>>
>>Regards, -Lew
>>
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>>posting. To request this thread, e-mail win32-thread135@stripped
>>
>>To unsubscribe, send a message to the address shown in the
>>List-Unsubscribe header of this message. If you cannot see it,
>>e-mail win32-unsubscribe@stripped instead.
>>
>>
>---
>Peter B. Carter (peterc@stripped)
>Pager: 613-751-4660
>http://www.pbc.ottawa.on.ca
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail win32-thread136@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail win32-unsubscribe@stripped instead.
>