Hey all,
I am wanting to do a query that is going to pull a list of dates/times.. I want to then subtract the 1st date from the last date so that I get a # of days/hrs between the two. I can do the subtract the two dates part, but my question is how do I nab the first and last dates found as the ones to subtract instead of any of the others? For example:
Oct 10
Oct 11
Oct 12
Oct 13
Oct 14
Oct 15
would all be pulled.. I want to subtract the Oct 10 from the Oct 15 date to get 5 days, but I have to have the query look at all the dates to know which dates are the earliest and which are the latest.
Not sure if this is something that would be done in php or in mysql.. any ideas? Thanks!