Java Parse Date parseDateString(String pattern, String dateString)

Here you can find the source of parseDateString(String pattern, String dateString)

Description

parse Date String

License

Apache License

Declaration

public static String parseDateString(String pattern, String dateString) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

public class Main {
    public static String parseDateString(String pattern, String dateString) {
        SimpleDateFormat df = new SimpleDateFormat(pattern);
        try {/*from   w  w w.j a  v  a 2  s.c  o  m*/
            return df.format(df.parse(dateString));
        } catch (java.text.ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. parseDateRfc822(String str)
  2. parseDates(String query)
  3. parseDateStrFormat(String strDate)
  4. parseDateString(String dateStr)
  5. parseDateString(String dateString)
  6. parseDateString(String s)
  7. parseDateString(TimeZone tz, String dateString)
  8. parseDateStringToDate(DateFormat format, String dateString)
  9. parseDateStrShort(String date)