Re: operation with dates

2011-05-13 Thread Hal�sz S�ndor
2011/05/13 09:46 -0500, Dan Nelson Datediff isn't portable, either :) What of the date arithmetic is? I looked at it, and saw beside much that it was MySQL extension. But at least a function of fixed arguments looks like any other function; there is hope of writing one. The IN

Re: operation with dates

2011-05-13 Thread Dan Nelson
In the last episode (May 12), Halßsz Sßndor said: > 2011/05/12 13:06 -0500, Dan Nelson > In the last episode (May 12), Rocio Gomez Escribano said: > > I found it, > > > > mysql> select userID from user where datediff(now(), userPaymentDate)< 365; > > This can be made more readable by

Re: operation with dates

2011-05-13 Thread Hal�sz S�ndor
2011/05/12 13:06 -0500, Dan Nelson In the last episode (May 12), Rocio Gomez Escribano said: > I found it, > > mysql> select userID from user where datediff(now(), userPaymentDate)< 365; This can be made more readable by using mysql's INTERVAL syntax. And less portable

Re: operation with dates

2011-05-12 Thread Dan Nelson
In the last episode (May 12), Rocio Gomez Escribano said: > I found it, > > mysql> select userID from user where datediff(now(), userPaymentDate)< 365; This can be made more readable by using mysql's INTERVAL syntax. It can also be made more efficient by moving userPaymentDate out of the functi

RE: operation with dates

2011-05-12 Thread Rocio Gomez Escribano
ensaje original- De: Andrew Moore [mailto:eroomy...@gmail.com] Enviado el: jueves, 12 de mayo de 2011 17:11 Para: Rocio Gomez Escribano CC: mysql@lists.mysql.com Asunto: Re: operation with dates Rocio, there are specific date functions that you need to learn to allow you to complete this kind of

Re: operation with dates

2011-05-12 Thread Andrew Moore
Rocio, there are specific date functions that you need to learn to allow you to complete this kind of query. Please check out the MySQL documentation for this. HTH Andy On Thu, May 12, 2011 at 4:05 PM, Rocio Gomez Escribano < r.go...@ingenia-soluciones.com> wrote: > Hello! I’m trying to subt

operation with dates

2011-05-12 Thread Rocio Gomez Escribano
Hello! I’m trying to subtract two dates in my consult, but I don’t get it, I did: mysql> select userID from user where (userPaymentDate - now()) < 365 ; It didn’t work. Do you know how to do it? Thank you so much! Regards Rocío Gómez Escribano