View Single Post
Old 04-15-2012, 03:24 PM   PM User | #2
sean3838
New Coder

 
Join Date: Jan 2012
Posts: 90
Thanks: 1
Thanked 13 Times in 13 Posts
sean3838 is an unknown quantity at this point
You may need to format your date first. Import java.text.DateFormat; then try:

Code:
			/** Create Calendar variable */
			
			Calendar now = Calendar.getInstance();
			
			/** Create and cast offset variable */
			
			int offset = Integer.parseInt(parms.getProperty("offset"));
			
			/** Add the offset to the current date */
			
			now.add(Calendar.DATE, offset);
			DateFormat newDate = DateFormat.getDateInstance(DateFormat.LONG);
                        String newDateString = newDate.format(now);

			/** Display updated date */
			
			msg += "<p>New Calendar Date, " + newDateString + "!</p>";
			// "</form>\n" + add(Calendar.DATE,offset);

Last edited by sean3838; 04-15-2012 at 03:32 PM..
sean3838 is offline   Reply With Quote