Java Time Now getNowString()

Here you can find the source of getNowString()

Description

return a string of todays date time suitable this is in more international form that the version above

License

Apache License

Declaration

public static String getNowString() 

Method Source Code

//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;
    }
}

Related

  1. getNowStr()
  2. getNowStr()
  3. getNowStr()
  4. getNowStrDateVerbose()
  5. getNowString()
  6. getNowString(String pattern)
  7. getNowTime()
  8. getNowTime()
  9. getNowTime()