Welcome!

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

Reply
Contributor
lvandyk
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.

 

Thanks!

Please use plain text.
Developer
developer_aman_arora
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
Please use plain text.
New Developer
vishalkheterpal
Posts: 134
Registered: ‎01-11-2011
My Device: curve

Re: Get Date object from DateTimerPicker

http://docs.blackberry.com/en/developers/deliverables/18125/Date_picker_1184774_11.jsp

 

 

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

Please use plain text.