Hi,
getDuration will work for a picker of type duration. 
If you want to convert a date to long just use getTime() on the resulting 
date object.

On Thursday, January 14, 2021 at 4:47:24 AM UTC+2 [email protected] wrote:

> Hi,
>
> I need to move the selected date in the picker component to a "Long" type 
> field. To do this I use the "getDuration ()" method and in the debugger 
> it shows the message "[EDT] 0: 2: 18,194 - Exception: 
> java.lang.ClassCastException - java.util.Date cannot be cast to 
> java.lang.Long "
>
> If I am doing something wrong I would like you to tell me which is the 
> correct way.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/f13cecbc-a1fc-41bb-a27c-89df7093cb97n%40googlegroups.com.

Reply via email to