Here you can find the source of getGenerationTime(String format)
Parameter | Description |
---|---|
format | a parameter |
public static String getGenerationTime(String format)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { /**/*from ww w. ja v a2 s . c o m*/ * generate current time * * @param format * @return */ public static String getGenerationTime(String format) { SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.US); String sysdate = formatter.format(new Date()); return sysdate; } }