import java.text.SimpleDateFormat;
import java.util.Date;
String sYear = sExpireTime.substring(0,4) ;
String sMonth = sExpireTime.substring(5,7) ;
//logger.debug("年:" + sYear);
//logger.debug("月:" + sMonth);
String sNewExpireTime = sYear+"-"+sMonth + "-01 00:00" ;//新过期时间
logger.debug("新日期:" + sNewExpireTime);
**SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm");**
**Date dt = sdf.parse(sNewExpireTime);**
//修改订单信息,将计算字段的数据,回写到整数型字段。
JSONObject param = new JSONObject();
param.put("id", dm.getLong("id"));
param.put("expire_time__c", **dt.getTime()**); // 有效期expire_time__c
logger.debug("回写产品参数:" + param.toJSONString());
JSONObject result = PaasUtils.updateStandardObject(rkhdClient, "product", param);
logger.debug("回写产品结果:" + result.toJSONString());
【销售易】time处理
最新推荐文章于 2022-10-03 15:10:46 发布