Android Time Get getDate(String time)

Here you can find the source of getDate(String time)

Description

get Date

Declaration

public static Date getDate(String time) 

Method Source Code

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

public class Main {
    public static Date getDate(String time) {
        Date date = new Date(System.currentTimeMillis());
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        try {/*  w w w  .j ava  2 s  .  co m*/
            date = format.parse(time);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }
}

Related

  1. getFormatTime(Date date)
  2. getCurTimeByFormat(String format)
  3. getCurTimeByFormat(String format)
  4. getCurrentTime(String dateFormat)
  5. getDate(String time)
  6. getDateLabel(long time)
  7. getDateTime()
  8. getDateTime(String format)
  9. getDateTimeFromCal(Calendar cal)