怎么求本月的时间段 例如当前是2009-9-26求从2009-9-1 00:00:00 到2009-10-1 00:00:00 这个日期时间段 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from t where left(tdate,10) between '2009-9-1' and '2009-10-1' mysql> select concat(year('2009-9-26'),'-', -> month('2009-9-26'),'-01',' 00:00:00') begin, -> concat(last_day('2009-9-26'),' 23:59:59') end;+--------------------+---------------------+| begin | end |+--------------------+---------------------+| 2009-9-01 00:00:00 | 2009-09-30 23:59:59 |+--------------------+---------------------+1 row in set (0.00 sec) echo '开始时间:',date("Y-m-1 00:00:00"),'<br/>结束时间:',date("Y-m-t 23:59:59"),die; DATE_FORMAT(yourfield, '%Y-%m') ='".date("Y-m")."'; echo date('Y-m-1 00:00:00', time());//2009-09-1 00:00:00echo date('Y-m-1 00:00:00', strtotime('+1 month',time()));//2009-10-1 00:00:00 WIN7 64位 无法开启curl PHP 登陆验证时代码有问题 PHP一个很基础的小问题,求指教 zend studio的使用 try catch哪位能举个例子?? PHP 调用 c# 写的web-service的问题 PHP一个小问题,盼高手帮我解决 我的php里没有php_gd.dll,有哪位好心人能告诉我在哪里有下吗? 关于图形 php页面显示记录的时候时有时无,求高手帮忙解答啊!!! 求一个PHP函数 将IP地址进行替换 PHP编码问题
select * from t where left(tdate,10) between '2009-9-1' and '2009-10-1'
mysql> select concat(year('2009-9-26'),'-',
-> month('2009-9-26'),'-01',' 00:00:00') begin,
-> concat(last_day('2009-9-26'),' 23:59:59') end;
+--------------------+---------------------+
| begin | end |
+--------------------+---------------------+
| 2009-9-01 00:00:00 | 2009-09-30 23:59:59 |
+--------------------+---------------------+
1 row in set (0.00 sec)
echo date('Y-m-1 00:00:00', strtotime('+1 month',time()));//2009-10-1 00:00:00