Android Date Format dateFormat(String sdate, String format)

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

Description

date Format

License

Apache License

Declaration

public static String dateFormat(String sdate, String format) 

Method Source Code

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

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   ww w .  j a va2 s  .  c om
}

Related

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