2

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.

Rajapandian
  • 9,257
  • 24
  • 74
  • 86

1 Answers1

3

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

Lucifer
  • 29,392
  • 25
  • 90
  • 143
Anthony Rizk
  • 3,666
  • 20
  • 21