Java Hour Format formattedTimeForFilenames()

Here you can find the source of formattedTimeForFilenames()

Description

formatted Time For Filenames

License

Open Source License

Declaration

public static String formattedTimeForFilenames() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String formattedTimeForFilenames() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");

        return sdf.format(new Date());
    }// w w w .  j a v a  2s  .c  o  m
}

Related

  1. formattedDate()
  2. formattedDate(java.util.Date date, String formatString)
  3. formattedDateToDate(String str)
  4. formattedStringToDate(String date)
  5. formattedTime(long epochTime)
  6. formatterDate(Date date, byte format)
  7. formatterFor(final Thread t)
  8. formatTime(Date d)
  9. formatTime(Date d)