Android Time Get getDate(String time)

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

Description

get Date

License

Open Source License

Declaration

@SuppressLint("SimpleDateFormat")
    public static Date getDate(String time) 

Method Source Code

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

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.annotation.SuppressLint;

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

Related

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