Android Date Format dateFormat(String sdate, String format)

Here you can find the source of dateFormat(String sdate, String format)

Description

date Format

Declaration

public static String dateFormat(String sdate, String format) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {
    public static String dateFormat(String sdate, String format) {
        SimpleDateFormat formatter = new SimpleDateFormat(format);
        java.sql.Date date = java.sql.Date.valueOf(sdate);
        String dateString = formatter.format(date);

        return dateString;
    }/*from  w  w w.ja va2s  .c o  m*/
}

Related

  1. formatDate(final Date date)
  2. getStringFromDate(Date date, String format)
  3. getFormatTomorrow(String format)
  4. getDisplayDate(Date date, String format)
  5. getFormatedDate(Date date, String format)
  6. dateFormat(String sdate, String format)
  7. formatcurrentDate(int format)
  8. formatDataTime(Date date)
  9. formatDate(Date date)