Android Date Format toStringUS(Date date)

Here you can find the source of toStringUS(Date date)

Description

to String US as format "MM/dd/yyyy"

License

Open Source License

Declaration

public static String toStringUS(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String DATE_FORMAT_MM_dd_yyyy = "MM/dd/yyyy";

    public static String toStringUS(Date date) {
        return toString(date, DATE_FORMAT_MM_dd_yyyy);
    }//from w  w  w. j av a2 s  .  c o m

    public static String toString(Date date, String format) {
        SimpleDateFormat outputFormat = new SimpleDateFormat(format);
        return outputFormat.format(date);
    }
}

Related

  1. toDateTimeString(Date value)
  2. toRelativeDateString(Date value)
  3. toString(Date date, String format)
  4. toString(Date value, String format)
  5. toStringFR(Date date)
  6. toTimeString(Date value)
  7. format(Date date)
  8. format(Date date, String pattern)
  9. formatData(Date date)