mysql常用函数
1、字符串连接concat(str...) --有null为null 应用字段合并

2、mysql常见日期相关函数

来源:http://www.w3school.com.cn/sql/sql_dates.asp
a: Now()
获取当前时间(yyyy-MM-dd HH:mm:ss)

b:curdate()
获取当前日期

c:curTime()
获取当前时间

d:date(Now())
获取相关日期或者日期时间中的日期部分


e:date_add(Now(), interval exp type)
获取后天的这个时间

f:date_sub(Now(), interval exp type)

g:datediff(date1, date2)
获取两个日期直接相差的天数,结果为:date1 - date2 (可正可负)

h:extract()
返回日期时间的部分

i:date_format(date, format);
用不同的格式来显示日期时间


参考:http://www.w3school.com.cn/sql/func_date_format.asp

浙公网安备 33010602011771号