Here you can find the source of getFormatToSecsForFilename()
yyyy-MM-dd_HH-mm-ss
public static SimpleDateFormat getFormatToSecsForFilename()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static final String FORMAT_TO_SECS_FOR_FILE = "yyyy-MM-dd_HH-mm-ss"; /**//from w ww . ja v a 2 s. c o m * Returns a date format to the resolution of seconds, for use in filenames: * <p> * <code> * yyyy-MM-dd_HH-mm-ss * </code> * * @return The result */ public static SimpleDateFormat getFormatToSecsForFilename() { return new SimpleDateFormat(FORMAT_TO_SECS_FOR_FILE); } }