Java Year Format stringYYYYmmDDhhMMssToDate(String value)

Here you can find the source of stringYYYYmmDDhhMMssToDate(String value)

Description

string YYY Ymm D Dhh M Mss To Date

License

Open Source License

Parameter

Parameter Description
value String

Return

Date

Declaration

public static Date stringYYYYmmDDhhMMssToDate(String value) 

Method Source Code

//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;
    }
}

Related

  1. isYear(int y)
  2. isYear(String str, boolean nullCheck)
  3. isYearOnly(String input)
  4. isYYYY(String strDate)
  5. lastDayOfWeek(String year, int week, String format)
  6. toDateString(String ddMMMyyyy)
  7. toYYYYMM(Date date)
  8. toYYYYMMDD(Calendar cal)
  9. toYyyyMMddToDate(String date)