Java Day of strToShortday(String s)

Here you can find the source of strToShortday(String s)

Description

str To Shortday

License

Apache License

Declaration

public static Date strToShortday(String s) 

Method Source Code

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

import java.text.ParsePosition;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static Date strToShortday(String s) {
        try {//from w  w  w. ja  va  2  s .  c  om
            SimpleDateFormat simpledateformat = new SimpleDateFormat("yyyy-MM-dd");
            ParsePosition parseposition = new ParsePosition(0);
            return simpledateformat.parse(s, parseposition);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. plusDay(Date date, int day)
  2. plusDays(Date date, int days)
  3. setDays(Date date, int amount)
  4. startOfDay(Date date, String format)
  5. stringSomeDaysAgo(Date currentTime, int days)
  6. subtractDate(Date d, long day)
  7. toCurrentDatedefer(int day)
  8. ToEnglishDay(Date dt)
  9. ToEnglishDayWithMon(Date dt)