收藏Mamatha HL (FPSS) 提问于 #Apex2015年3月27日 06:12String to date conversion?I have a string date '3/26/15' in MM/dd/yy, i want to convert to Date object. But using Date.parse(StringDate) gives me Invalid Date error even with Date.valueOf(StringDate) throws same error.Please help ASAP.Thank you in advanceSachin1 个回答排序按日期排序按最有帮助排序按日期排序Manoj Kumar Jena (GE Healthcare)2015年3月27日 06:19Hi Sachin,Please check below code ,It will work .String str='3/26/15';String strr=str.replace('/','-')+' 00:00:00';Date dt=Date.valueOf(strr);添加评论撰写回答...粗体斜体下划线删除线项目符号列表编号列表添加链接代码块插入图像附加文件链接 URL取消保存0/9000回复
Manoj Kumar Jena (GE Healthcare)2015年3月27日 06:19Hi Sachin,Please check below code ,It will work .String str='3/26/15';String strr=str.replace('/','-')+' 00:00:00';Date dt=Date.valueOf(strr);