本文实例讲述了JS简单实现String转Date的方法。分享给大家供大家参考,具体如下:
[removed]
var s=["2008-8-1","2009/9/2","10/3/2010"];
for(var i=0;i<s.length;i++){
var d = string2date(s[i]);
var year = d.getFullYear();
var month = d.getMonth()+1;
var date = d.getDate();
va
日期选择器 [removed] /** * 返回日期 * param d the delimiter * param p the pattern of your date * author Xinge(修改) */ String.prototype.toDate = function(x, p) { if(x == null) x = “-“; if(p == null) p = “ymd”; var a = this.split(x); var y = parseInt(
本文转自:http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_date-format
DATE_FORMAT(date,format)
Formats the date value according to the format string.
The following specifiers may be used in the format string. As of MySQL 3.2