flex 默认日期格式如:Wed Dec 16 00:00:00 GMT+0800 2015 想要得到的通用格式如:2015-12-16 转换方法如下: var sdate:String = "Wed Dec 16 00:00:00 GMT+0800 2015"; var date:Date = new Date(sdate); var format:DateFormatter=new DateFormatter(); format.formatString="YYYY-MM…
function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + '-'; var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; var D = (date.getDate…
function getLocalTime(nS) { var date = new Date(nS); var Y = date.getFullYear() + '-'; var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; var D = (date.getDate() < 10 ? '0'+date.getDate(…
util.js : function transTime(unixtime) { var dateTime = new Date(parseInt(unixtime) * 1000) var year = dateTime.getFullYear(); var month = dateTime.getMonth() + 1; var day = dateTime.getDate(); var hour = dateTime.getHours(); var minute = dateTime.g…
日期格式与时间戳之间的转化 一:日期格式转化为时间戳 function timeTodate(date) { var new_str = date.replace(/:/g,'-'); new_str = new_str.replace(/ /g,'-'); var arr = new_str.split("-"); var datum = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4],arr[5])); return…
PROCEDURE MAIN(ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2, P_CUSTOMER_ID IN VARCHAR2, P_PERSON_ID IN VARCHAR2, P_MAKER_ID IN VARCHAR2, P_START_DATE IN VARCHAR2, --这里为字符格式 P_END_DATE IN VARCHAR2 --这里为字符格式 ) IS l_contract_date_from DATE; -- 合同日期至 l_cont…