I just started this thread in the bugs section:
But Erel has decided it is a question, not a bug.
I have another example:
which when you run it gives this log:
if this an error on my part I would like to know what I am doing wrong.
What happened on 29 October 1984?
Hi, This has me mystified, if you run this bit of code: Private Sub AppStart(Form1 As Form, Args() As String) DateTime.DateFormat="yyyy-MM-dd" Private wrk_datelong1, wrk_datelong2 As Long wrk_datelong2 = DateTime.DateParse("1984-10-25") wrk_datelong1 =...
www.b4x.com
But Erel has decided it is a question, not a bug.
I have another example:
B4X:
Private Sub AppStart(Form1 As Form, Args() As String)
DateTime.DateFormat="yyyy-MM-dd"
Private wrk_datelong1, wrk_datelong2 As Long
wrk_datelong2 = DateTime.DateParse("1985-02-27")
wrk_datelong1 = DateTime.DateParse("1985-02-28")
Log("1985-02-28 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2))
wrk_datelong2 = wrk_datelong1
wrk_datelong1 = DateTime.DateParse("1985-03-01")
Log("1985-03-01 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2))
wrk_datelong2 = wrk_datelong1
wrk_datelong1 = DateTime.DateParse("1985-03-02")
Log("1985-03-02 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2))
wrk_datelong2 = wrk_datelong1
wrk_datelong1 = DateTime.DateParse("1985-03-03")
Log("1985-03-03 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2))
wrk_datelong2 = wrk_datelong1
wrk_datelong1 = DateTime.DateParse("1985-03-04")
Log("1985-03-04 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2) & " <<<<<<<<<")
wrk_datelong2 = wrk_datelong1
wrk_datelong1 = DateTime.DateParse("1985-03-05")
Log("1985-03-05 " & wrk_datelong1 & " " & (wrk_datelong1 - wrk_datelong2))
'StartMessageLoop
End Sub
Waiting for debugger to connect...
Program started.
1985-02-28 478357200000 86400000
1985-03-01 478443600000 86400000
1985-03-02 478530000000 86400000
1985-03-03 478616400000 86400000
1985-03-04 478706400000 90000000 <<<<<<<<<
1985-03-05 478792800000 86400000
if this an error on my part I would like to know what I am doing wrong.