Learning PHP and MySQL
Chapter 8 Code
Monday, August 07, 2006
Example 08-16 Using DATE_SUB to subtract days
SELECT DATE_SUB(NOW(), INTERVAL 12 DAY);
Posted by krautgrrl on 08/07 at 05:17 PM
Chapter 8 Code • (26) Comments • (1) Trackbacks • Permalink
Chapter 8 Code • (26) Comments • (1) Trackbacks • Permalink
Example 08-17 Using the minus operator on a date
SELECT NOW()-INTERVAL 12 DAY;
Example 08-18 Using DATE_FORMAT with a string to place colons between the segments
SELECT DATE_FORMAT('2006-12-24 09:09:23', '%h:%i:%s');
Statistics
This page has been viewed 279806 times
Page rendered in 0.6204 seconds
Total Entries: 224
Total Comments: 16
Total Trackbacks: 307338
Most Recent Entry: 09/27/2006 12:39 pm
Most Recent Comment on: 10/26/2007 10:00 am
Total Members: 2
Total Logged in members: 0
Total guests: 10
Total anonymous users: 0
Most Recent Visitor on: 09/09/2010 03:11 pm
The most visitors ever was 1103 on 11/20/2007 12:50 pm
