|
Use the date of the timestamp. Don't worry about figuring out the whole timestamp. Also, look at the CURRENT DATE of the following: SELECT MYTIMESTAMP, date(mytimestamp), current date as today, days(date(mytimestamp)), days(current date), days(current date) - days(date(mytimestamp)) as spread FROM qtemp/nbty MYTIMESTAMP DATE TODAY DAYS DAYS SPREAD 2007-02-16-10.40.11.041002 02/16/07 02/16/07 732,723 732,723 0 2007-02-13-23.40.11.041002 02/13/07 02/16/07 732,720 732,723 3 2007-02-14-11.40.11.041002 02/14/07 02/16/07 732,721 732,723 2 2007-02-11-11.40.11.041002 02/11/07 02/16/07 732,718 732,723 5 2007-02-10-11.40.11.041002 02/10/07 02/16/07 732,717 732,723 6 2007-02-12-11.40.11.041002 02/12/07 02/16/07 732,719 732,723 4 2007-02-09-11.40.11.041002 02/09/07 02/16/07 732,716 732,723 7 ******** End of data ******** Add WHERE SPREAD>7 Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.