Java Day of formatDayTime(String day)

Here you can find the source of formatDayTime(String day)

Description

format Day Time

License

Open Source License

Declaration

public static java.util.Date formatDayTime(String day) 

Method Source Code


//package com.java2s;
/*/*  w w  w . j av  a 2s . c  om*/
 * Copyright 2010 Mttang.com All right reserved. This software is the
 * confidential and proprietary information of Mttang.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Mttang.com.
 */

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

public class Main {
    static final SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");

    public static java.util.Date formatDayTime(String day) {
        try {
            return yyyyMMdd.parse(day);
        } catch (ParseException ex) {
            ex.printStackTrace();
            return new java.util.Date();
        }
    }
}

Related

  1. CountCmpHolidays(Date stdate, Date enddate, String[] CmpHoliDays)
  2. countDay(String begin, String end)
  3. endOfTheDay(Date date)
  4. formatDate(String day)
  5. formatDay(final Date time)
  6. formatShortNameOfDay(final Date date)
  7. get1DayBeforDate()
  8. get8BitTime(Date date, int deltaDay)
  9. getAfterDays(String date, String pattern, int afterDays)