function dateShow(date) {
date=date.toString();
if (date.length == 8) {
var strDate;
var str = date.substr(0, 4),
str1 = date.substr(4, 2),
str2 = date.substr(6);
strDate = str + "-" + str1 + "-" + str2;
return strDate
}
}
dateShow(20150124)