I'm a newbie so please help me in this. I have a datebox with a default date format and its working and d开发者_如何学Goisplaying selected date in the box as expected.
Now, I need to get individual values from whats being displayed/selected, i.e., month, date, year. I need them to be used to query something in database.
Example : Displayed as July 14th, 2010. I require after displaying it in box, the numeric values as 7(for month), 14(for date), 2010(for the year).
Plese help, I'll be really thankful.
_ Chirayu Diwan
DateBox
has a method getValue()
which returns an obect of type java.util.Date
. This class has individual method to get getYear()
, getMonth()
(offsets with 0, so 0 is January) and getDay()
.
精彩评论