Java Date Now getCurrentStringDate(String pattern)

Here you can find the source of getCurrentStringDate(String pattern)

Description

get Current String Date

License

Apache License

Declaration

public static final String getCurrentStringDate(String pattern) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String getCurrentStringDate(String pattern) {
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat(pattern);
        return formatter.format(currentTime);
    }/*from  w  w w  .  j a  va2s  .  c  o  m*/
}

Related

  1. getCurrentPlainDate()
  2. getCurrentQuarter()
  3. getCurrentSecond()
  4. getCurrentString(String pattern)
  5. getCurrentStringDate()
  6. getCurrentStringDateYMD()
  7. getCurrentStrTimeMills()
  8. getCurrentTime()
  9. getCurrentTime()