Android Calendar String Parse fromString(String dateString, String format)

Here you can find the source of fromString(String dateString, String format)

Description

from String

License

Open Source License

Declaration

public static Date fromString(String dateString, String format)
            throws ParseException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date fromString(String dateString, String format)
            throws ParseException {
        SimpleDateFormat inputFormat = new SimpleDateFormat(format);
        return inputFormat.parse(dateString);
    }/*from   w w w  . ja v a2s.c  o  m*/
}

Related

  1. format(String time)
  2. parseCalendar(int year, int month, double day, TimeZone zone)
  3. parseCalendar(int year, int month, int day, int hour, int minute, int second, int millisecond, TimeZone zone)
  4. parseDA(Calendar c, String s, int off, int len)
  5. parseTM(Calendar c, String s, int off, int len)