Here you can find the source of getFriendlyTimeStamp()
public static String getFriendlyTimeStamp()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from w ww .ja v a 2 s . c om*/ * Get date/time stamp with spaces replaced with underscores. * Typically needed when it has to be used in a file name, etc. * @return */ public static String getFriendlyTimeStamp() { return new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); } }