Urgent DATA help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there everyone,

 

My client suddenly dropped on me that they need to be able to search by
date, IE: the past 1 day, 3 days, 5 days or 7 days.  In the DB, the date
format is: 2001-07-05 (For example) but I have no clue how to count the days
in between to know how many days I am counting.  Say they have something at
the end of feb and it runs into march, I have no clue how to work this out.

 

Could anyone show me an example of how to do this?  So to take 2001-07-05
and add 3 days to it?  So if they choose 3 days, it would have to be CURRENT
DATE + 2 I guess, that way you would see all dates from CURRENT DATE OR date
= '2001-07-06' OR date = '2001-07-07'.

 

Any help really would be appreciated.

 

Chris


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux