tags:

views:

577

answers:

1

Hi, I am using DateField to display the Date and Time in my Blackberry Program,if the user changes the date it should be updated in the database.But the DateField component returns as a long value, i cannot do anything with this long value.If anyone knows how to get the Date and Time value as String please help me.

+1  A: 

net.rim.device.api.i18n.SimpleDateFormat will let you easily format a long date/time into any String Date/Time you want.

If you want to just get the individual components of the long date/time as individual numeric values, use java.util.Calendar

Anthony Rizk