I'm allowing the user to input a date and time and I'm using the pattern:
DateTimeFormat format = DateTimeFormat.getFormat(-MM-dd HH:mm);
However, the date is specified as UTC, so if a user were to put in:
2013-01-01 15:30
This will parse fine, but when printing out the parsed date
OK, I got it working just as I wanted by appending the Z to both the
pattern and the input date. So, doing this:
DateTimeFormat format = DateTimeFormat.getFormat(-MM-dd HH:mm);
And this:
2013-01-01 15:30Z
Gets me this:
Jan 1st 2013 7:30 GMT-8
Hope this helps someone else.
http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html
Package java.util
Date
Date(), Date(int, int, int), Date(int, int, int, int, int), Date(int,
int, int, int, int, int), Date(long), Date(String), parse(String),
UTC(int, int, int, int, int, int), after(Date), before(Date), clone(),
There are some examples in the following url... have you tried them?
http://code.google.com/p/gwt-examples/wiki/gwtDateTime
On Thu, Oct 14, 2010 at 11:26 PM, Diego Venuzka dvenu...@gmail.com wrote:
Hi!
I need get the date of the system and store it. Using GWT, how i can do
this? Is
*Dear All,*
**
* I got a doubt. please help me .*
**
* i have a DateField 'from_date' which is a
'com.gwtext.client.widgets.form.DateField
.'*
* i want to convert this date to java.util.Date. *
* I have to do this in a GWT-page which is in client side . *
**
*Is it possible
I think u will get the value in dateformat only.
if u use DateField.getValue() it will return the value as Date
object.so no need of converting into Date Object. u can use directly
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the