At 9:02 -0600 1/9/02, Robert L. Yelvington wrote: >Two quick qux for the gurus on the list! > >1. If I needed to do date calculations based upon a TIME STAMP field, what's >the most efficient way to accomplish this with respect to data types (field >types...I already understand how to use the DATE functions and am aware of >locale time and UNIX time trappings)? For example, someone signs up on a >mailing list via mysql data base, and then I want to know how many people >have signed up in Jan, 2001 or March, 1999 or Jan, 2002? OR, another
Jan, 2001: SELECT COUNT(*) FROM tbl_name WERE MONTH(t) = 1 AND YEAR(t) = 2001; Others are similar. >example, someone signs up and I want to calculate 4 ninety day cycles with a >reminder sixty days from sign up, so that if I signed up on Jan 1, 2002 then >on Mar 1, 2002, I'd like to send notification that their account needs >maintenance by April 1, 2002...kinda like a billing system. Use DATE_ADD(). --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php