Here you can find the source of stringYYYYmmDDhhMMssToDate(String value)
Parameter | Description |
---|---|
value | String |
public static Date stringYYYYmmDDhhMMssToDate(String value)
//package com.java2s; /*//from w w w . j a v a 2 s. c om * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** * * @param value String * @return Date */ public static Date stringYYYYmmDDhhMMssToDate(String value) { try { SimpleDateFormat dbUpdateDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return dbUpdateDateTime.parse(value); } catch (ParseException ex) { } return null; } }