Here you can find the source of dateToFileName(String date)
public static String dateToFileName(String date)
//package com.java2s; //License from project: Open Source License public class Main { public static String dateToFileName(String date) { String separator = "_"; date = date.replaceAll(" ", separator); date = date.replaceAll("\\.", separator); date = date.replaceAll(":", separator); date = date.replaceAll("-", separator); date = date.replaceAll("/", separator); return date; }/*from ww w .j a v a2 s . c o m*/ }