Mike,
Sure, try this:
UPDATE table SET days = TO_DAYS(exp_dte) - TO_DAYS(NOW());"
As a side note, I recommend you make this calculation in whatever
application this DB supports. Otherwise you will continue to need
running a script to update the dates.
Regards,
A$
On Saturday, August 2, 2003,
Mike,
Is the field meant to be the number of days until ?
(This is implied by the number 14 you gave). If so, you shouldn't be
storing the days value in the database at all (the reason being it
causes exactly the problem you seem to have).
Instead you should store only expdate and then calculate
Hello,
I need to update one of our mysql tables, which has about 60,000 entires and
correct the amount of days remain on each data record. An example of one of the
data entires is:
memiddaysregdate expdate
--
625290 | 5 | 2003-07-15 | 2003-08-