Java SQL Date Parse parseDateYYMMddHHmm(java.util.Date date)

Here you can find the source of parseDateYYMMddHHmm(java.util.Date date)

Description

parse Date YYM Mdd H Hmm

License

Open Source License

Declaration

public static String parseDateYYMMddHHmm(java.util.Date date) 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_yyMMddHHmm = "yyMMddHHmm";

    public static String parseDateYYMMddHHmm(java.util.Date date) throws ParseException {
        return new SimpleDateFormat(DATE_FORMAT_yyMMddHHmm).format(date);
    }//w  w  w .  j  a  va2  s.  c o  m

    public static java.util.Date parseDateYYMMddHHmm(String ds) throws ParseException {
        return new Date(new SimpleDateFormat(DATE_FORMAT_yyMMddHHmm).parse(ds).getTime());
    }
}

Related

  1. parseDate(String strFormat, String dateValue)
  2. parseDate(String value, String format)
  3. parseDate2(Date date, String pattern)
  4. parseDateE(Date dt)
  5. parseDateString(String tmp, String format)
  6. parseDateYYMMddHHmmss1(Date date)
  7. parseDateyyyy_MM_DD(String ds)
  8. parseSqlDate(final String value)
  9. parseSqlDate(final String value)