Java Parse Date Pattern YYYY parseDIGTime(String timestr)

Here you can find the source of parseDIGTime(String timestr)

Description

parse DIG Time

License

Apache License

Declaration

public static long parseDIGTime(String timestr) 

Method Source Code

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

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static long parseDIGTime(String timestr) {
        long timeIns = 0;
        DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        try {//from   w w w.j a va 2 s .co m
            Date date = (Date) formatter.parse(timestr);
            timeIns = date.getTime() / 1000;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return timeIns;
    }
}

Related

  1. parseCompactDate(String exp)
  2. parseCoTDate(String dateString)
  3. parseDatabaseDate(String dateString)
  4. parseDD(String dateStr)
  5. parseDelayTime(String time)
  6. parseDisplay4Key(Object date)
  7. parseDT(String fmt, String timeline)
  8. parseDueDate(String date)
  9. parseEapoDate(String date)