Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 19
Registered: ‎07-17-2012
My Device: BB 10 Alpha Device
My Carrier: Vodacom

Get Date object from DateTimerPicker

Can anyone provide code on how to place a DateTimerPicker on the screen that can be used to retrieve a Date object?


The reason I need a Date object is to get the milliseconds since the epoch to create an appointment in the calendar.



Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Get Date object from DateTimerPicker

Date date = picker.getDateTime().getTime();

Hit Like if you found your Solution
New Developer
Posts: 134
Registered: ‎01-11-2011
My Device: curve

Re: Get Date object from DateTimerPicker




alse datepicker.getdatetime() Method gives you calender object with current date and time.