Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get full date with time in Java?

    • 0
    • 1
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 297
    Comment on it

    To get the full date with time you can use the below code. You can pass any date that you wan to change, I'm getting date in full date format in the below example:

       

        /**
    	 * Get full month day year format from Date
    	 * 
    	 * @param createDate
    	 * @return
    	 */
    	public static String getFullDateFormat(Date createDate)
    	{
    		SimpleDateFormat simple = new SimpleDateFormat();
    		simple.applyPattern("MMMMMMMMM dd yyyy hh:mm:ss a");
    		return simple.format(createDate);
    	}

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: