Java SQL Date Parse parseDateyyyy_MM_DD(String ds)

Here you can find the source of parseDateyyyy_MM_DD(String ds)

Description

parse DateyyyMDD

License

Open Source License

Declaration

public static Date parseDateyyyy_MM_DD(String ds) throws ParseException 

Method Source Code


//package com.java2s;
import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    public final static String DATE_FORMAT_yyyy_MM_dd = "yyyy-MM-dd";

    public static Date parseDateyyyy_MM_DD(String ds) throws ParseException {
        return new Date(new SimpleDateFormat(DATE_FORMAT_yyyy_MM_dd).parse(ds).getTime());
    }// w w w  .  j a  va 2s.c  om
}

Related

  1. parseDate2(Date date, String pattern)
  2. parseDateE(Date dt)
  3. parseDateString(String tmp, String format)
  4. parseDateYYMMddHHmm(java.util.Date date)
  5. parseDateYYMMddHHmmss1(Date date)
  6. parseSqlDate(final String value)
  7. parseSqlDate(final String value)
  8. parseSqlDate(java.util.Date date)
  9. parseSqlDate(java.util.Date date)