I usually use date1.getTime() to convert the date to milliseconds since
epoch.  Then you can just perform arithmetic to figure out the date,
minutes,etc.  Minute, hour, second, day, week are easy to calculate from
milliseconds.  Months and years is harder due to varying number of days in
months/years.



On Mon, Apr 20, 2020 at 1:37 PM Peter Bell <[email protected]> wrote:

> Hi
>
> I was wondering if in Codenameone there are the smane functions as in
> vb.net  fpr
> 1.  convert datetime to double and double to datetime
> 2.  to get the difference in days, minutes between two dates
>
> ciao.
> Peter Bell
>
> --
> 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/ea049a27-2cae-41c2-abee-11ae8940912a%40googlegroups.com
> <https://groups.google.com/d/msgid/codenameone-discussions/ea049a27-2cae-41c2-abee-11ae8940912a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Steve Hannah
Software Developer
Codename One
http://www.codenameone.com

-- 
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/CAGOYrKWVEWWkFVgRVgHxOtjEOO0P8JmuYfAnYvHVSqVrUS6Mhw%40mail.gmail.com.

Reply via email to