Forum Moderators: coopster

Message Too Old, No Replies

Date() to time() transformation

         

nicuz

5:08 am on Apr 25, 2006 (gmt 0)



I am trying calculate a date that occurs in the future. The date is stored in my database in date(""Y-m-d") format. I am not sure if I can make calculations with this format, so my question is how can I transform a date from date() format to time() format?

Anyango

6:01 am on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



strtotime() that function will get it done for ya. have a look at

[php.net...]

coopster

10:19 pm on Apr 30, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



True, that is one option. Since it is in a database table you may also want to consider using your databases Date and Time functions to do the date manipulation before it is returned to you.