Java Date to String date2Str(Date date, String partten)

Here you can find the source of date2Str(Date date, String partten)

Description

date Str

License

Open Source License

Declaration

public static String date2Str(Date date, String partten) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static SimpleDateFormat df = new SimpleDateFormat();

    public static String date2Str(Date date, String partten) {
        String result = null;//w w w. j a  va  2 s . c o m
        df.applyPattern(partten);
        result = df.format(date);
        return result;
    }
}

Related

  1. date2Str(Date date)
  2. Date2Str(Date date)
  3. date2Str(Date date, String dateFormat)
  4. date2Str(Date date, String format)
  5. date2Str(Date date, String format)
  6. date2Str(Date date, String pattern)
  7. date2str(Date date, String pattern)
  8. date2Str(Date value)
  9. date2Str(final Date date, final String dateFormat)