<div dir="ltr"><div dir="ltr">611085255000 I think it is normal that it gives error being superior to 2147483647 (max of integer).<br>But I don't understand why this code returns 1200394968 instead of 611085255000:<br><br> Dim dData1 As Date = Now<br> Dim dData2 As Date = "01/01/2000"<br> Dim i As Integer<br><br> Print DateDiff(dData2, dData1, gb.Second)<br> Try DateDiff(dData2, dData1, gb.Millisecond)<br> If Error Then<br> Print DateDiff(dData2, dData1, gb.Second) * 1000<br> Else<br> DateDiff(dData2, dData1, gb.Millisecond)<br> Endif<br><br>Regards<br>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 13 mag 2019 alle ore 18:21 gen braga <<a href="mailto:genbraga1@gmail.com">genbraga1@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
in the below code:<br>
<br>
Dim dData1 As Date = Now<br>
Dim dData2 As Date = "01/01/2000"<br>
<br>
Print DateDiff(dData2, dData1, gb.Second)<br>
Print DateDiff(dData2, dData1, gb.Millisecond)<br>
<br>
is there anything wrong? I got an overflow when printing milliseconds<br>
<br>
-<br>
Gen<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>