Java SQL Date Format dateFormat(String sdate, String format)

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

Description

date Format

License

Open Source License

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  www.  ja  v  a2 s  .  c  om
}

Related

  1. dateFormat(Object obj, String parten)
  2. dateFormatJson(Date date)
  3. dateFromLong(Long longObject)
  4. formataData(Date data)
  5. formatAsText(ResultSet result_set, PrintWriter out)