Java Now nowFormat(String format)

Here you can find the source of nowFormat(String format)

Description

now Format

License

MIT License

Declaration

public static String nowFormat(String format) 

Method Source Code

//package com.java2s;
/**//  www  .j  a  va 2 s.  co m
 * Copyright (c) 2014 Sa?l Pi?a <sauljabin@gmail.com>, Jorge Parra <thejorgemylio@gmail.com>.
 * <p>
 * This file is part of SimulationP3DX.
 * <p>
 * SimulationP3DX is licensed under The MIT License.
 * For full copyright and license information please see the LICENSE file.
 */

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static String nowFormat(String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(Calendar.getInstance().getTime());
    }
}

Related

  1. nowDateString(String format)
  2. nowDateToString()
  3. nowDT()
  4. nowDT()
  5. nowFile()
  6. nowFormat(String format)
  7. nowIdentity()
  8. nowInBasicFormat()
  9. nowStr()