How to pick next or prevoius day?

Thread Solved

Join Date: Apr 2008
Posts: 490
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

How to pick next or prevoius day?

 
0
  #1
Jul 25th, 2008
Hi,
How can i pick next or prevoius day in mysql? Any function like curdate() ?
Thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 296
Reputation: tesuji is on a distinguished road 
Solved Threads: 42
tesuji tesuji is offline Offline
Posting Whiz in Training

Re: How to pick next or prevoius day?

 
0
  #2
Jul 25th, 2008
Originally Posted by veledrom View Post
Hi,
How can i pick next or prevoius day in mysql? Any function like curdate() ?
Thanks

next: today + 1
previous: today - 1
Information is moving—you know, nightly news is one way, of course, but it's also moving through the blogosphere and through the Internets. I promise you I will listen to what has been said here, even though I wasn't here. Ann and I will carry out this equivocal message to the world. I'm the master of low expectations.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,071
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: How to pick next or prevoius day?

 
0
  #3
Jul 26th, 2008
You can do it with DATEADD, directly in MySql

SELECT DATEADD(...) AS IncrementedDate from ...
DATEADD("2000-12-01",INTERVAL 1 DAY)
Last edited by Shanti Chepuru; Jul 26th, 2008 at 2:41 am. Reason: add
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 296
Reputation: tesuji is on a distinguished road 
Solved Threads: 42
tesuji tesuji is offline Offline
Posting Whiz in Training

Re: How to pick next or prevoius day?

 
0
  #4
Jul 26th, 2008
hi velodrom

  1. SELECT CURRENT_DATE() - INTERVAL 1 DAY AS "Help yesterday !",
  2. CURRENT_DATE() + INTERVAL 1 DAY AS "for tomorrow never come !";

may also give some results.

krs, tesu
Last edited by peter_budo; Jul 26th, 2008 at 5:17 pm. Reason: Keep It Organized - please use [code] tags
Information is moving—you know, nightly news is one way, of course, but it's also moving through the blogosphere and through the Internets. I promise you I will listen to what has been said here, even though I wasn't here. Ann and I will carry out this equivocal message to the world. I'm the master of low expectations.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 490
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: How to pick next or prevoius day?

 
0
  #5
Jul 26th, 2008
I'll try and let you know.
Thanks guys
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 490
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: How to pick next or prevoius day?

 
0
  #6
Jul 27th, 2008
Thank you guys. It works now. Tejusi, your solution is in use.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC