View Full Version : How to convert String to Date
I want to convert String to Date without using DateFormat and SimpleDateFormat. Kindly help me how to do this.
24 Jun 2009, 7:39 AM
You can use Date Deprecated methods...
Calendar is not available on GWT.
Why can't you/don't you want to use DateFormat?
I don't want to use DateFormat, so kindly tell me any other method with an example.
24 Jun 2009, 11:22 PM
As I said before, since you don't want to use DateFormat, you can then parse your String into day/month/year/hours/minutes
and then set a Date object using that (setDate, setMonth, setYear, setHour, setMinutes)
Those methods are deprecated, but they will work...
17 May 2010, 12:19 AM
String time1 = "05/10/2010"
com.google.gwt.i18n.client.DateTimeFormat dtf = com.google.gwt.i18n.client.DateTimeFormat
Date date1 = dtf.parseStrict(time1);
17 May 2010, 12:27 AM
Hi, that example is not valid in the Gwt world.
Gwt does not emulate no method in java.text
PS: I don't see a point on resurrecting a 1 year old message....
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.