View Single Post
  #1   IP: 112.87.30.158
Old 2015-04-19, 08:56 AM
Garwin Garwin is offline
初级会员
 
Join Date: 2008-04-24
Posts: 1
Garwin 现在声名狼藉
Default Update a date value?

What is the easiest way to update a date?

In my database I have a field called mydate that is setup as a timestamp datatype. (It as to be this datatype).

My dates are listed as either:
2013-07-25 00:00:00

or

0000-00-00 00:00:00

Meaning they either have a data or just zeroes, but never empty.

Edit: Thank you all! I sort of combined all that you said and made it work.

Now lets say I wanted to increase any give date with 10 days how would I accomplish that?

The first one, July 25th 2013 would become 2013-08-04 00:00:00 and the other would become 2013-06-18 00:00:00 (at the time of posting it's June the 8th).

How to?
Reply With Quote