PDA

View Full Version : getting time from Date



ghatfan99
10 Aug 2010, 3:30 AM
hello,
i ant to get the time in this format "hh:mm:ss" from an date to insert it in my field:


TextFieldMask dTime = new TextFieldMask("99:99:99");
dTime.setFieldLabel("Time, hh:mm:ss");
left.add(dTime, formData);
i tried with


SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
com.google.gwt.user.client.Window.alert("time: " + sdf.format(currentDate));
but i have a problem with:


import java.text.SimpleDateFormat;
thank's for your help