Here you can find the source of getNowString()
public static String getNowString()
//package com.java2s; //License from project: Apache License import java.text.*; import java.util.*; public class Main { /**/*w ww . jav a 2 s .co m*/ * return a string of todays date time suitable * this is in more international form that the version above * * @return */ public static String getNowString() { SimpleDateFormat sdf = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); // -> 23 Jan 2006 16:08:56 final String dateText = sdf.format(new Date()); return dateText; } }