Here you can find the source of strToDateM6(String StrToDate)
Parameter | Description |
---|---|
StrToDate | 'yyyy-MM-dd HH:mm:ss' |
public static Date strToDateM6(String StrToDate)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w w w . ja v a 2 s.c o m * StrToDate 'yyyy-MM-dd HH:mm:ss' * @param StrToDate 'yyyy-MM-dd HH:mm:ss' * @return Date */ public static Date strToDateM6(String StrToDate) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); try { return simpleDateFormat.parse(StrToDate); } catch (ParseException e) { //e.printStackTrace(); } return null; } }