问题描述
我的客户要求将日期
格式从mm / dd / yy更改为dd / mm / yy。如果有的话身体可以帮我解决
这方面非常紧急。
问候,
Santanu
Hi ,
I am stuck with a requirement from my client to change the date
format from mm/dd/yy to dd/mm/yy .If any body can help me out with
this regard as its very much urgent.
Regards,
Santanu
推荐答案
我使用:
未经测试:
函数convert(dateString){
var new = dateString.split(" /");
返回new [1] +" ; /" + new [0] +" /" + new [2];
}
Gregor
-
::: Landschafts - und Reisefotografie
::: meine JS-Spielwiese
::: Bildagentur fürdenalpinen Raum
Untested:
function convert(dateString) {
var new = dateString.split("/");
return new[1]+"/"+new[0]+"/"+new[2];
}
Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
未经测试:
函数转换(dateString){
var new = dateString.split(" / ");
返回新[1] +" /" + new [0] +" /" + new [2];
}
Untested:
function convert(dateString) {
var new = dateString.split("/");
return new[1]+"/"+new[0]+"/"+new[2];
}
如果这不起作用,请尝试使用
其他名称替换变量名new。如果这是一个问题,我不会感到惊讶。
If that doesn''t work, try replacing the variable name new with a
different name. I wouldn''t be surprised if that''s a problem.
这篇关于需要代码snipet将mm / dd / yy转换为dd / mm / yy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!