LimeReport设置当前打印时间

拉一个文本控件,然后填入下面信息:

$S{
var curDate = new Date();
var strYear = curDate.getFullYear().toString();
var strMonth = (curDate.getMonth() + 1).toString();
var strDay = curDate.getDate().toString();
var strHour = curDate.getHours().toString();
var strMinute = curDate.getMinutes().toString();
var strSecond = curDate.getSeconds().toString();
result = strYear + "-" + strMonth + "-" + strDay + " " + strHour + ":" + strMinute + ":" + strSecond;
}

LimeReport设置当前打印时间_第1张图片

 LimeReport设置当前打印时间_第2张图片

 

你可能感兴趣的:(java,前端,javascript)