[SOLVED]Problem building a time-dependent MySQL INSERT query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Code: Select all

date("YmdGis", $unix_timestamp); //This converts $unix_timestamp to MySQL timestamp
User avatar
steedvlx
Forum Contributor
Posts: 122
Joined: Wed Jun 11, 2003 10:54 pm
Location: Osaka, Japan

Post by steedvlx »

Thanks for that. But, (a bit cheeky here).. how would one go about adding 30 minutes to date("YmdGis", $unix_timestamp)? Just add 1800 to the value?

Or better yet, does anyone have a GOOD link reference on dealing with date and time manipulation functions. Wrox and Apress (and even php.net) don't seem to have a care for explaining them in much detail.

As always,
Thanks
Post Reply