U Ulli_53 Member Licensed User Jun 26, 2016 #1 I am using the following code in B4i: (using DateUtils) Dim diff As Period DateTime.DateFormat="dd.MM.yyyy HH:mm:ss" diff = DateUtils.PeriodBetweenInDays(DateTime.Now, DateTime.DateParse("27.07.2016 23:59:59")) Label1.Text = diff.Days Why does this code not work in B4A?
I am using the following code in B4i: (using DateUtils) Dim diff As Period DateTime.DateFormat="dd.MM.yyyy HH:mm:ss" diff = DateUtils.PeriodBetweenInDays(DateTime.Now, DateTime.DateParse("27.07.2016 23:59:59")) Label1.Text = diff.Days Why does this code not work in B4A?
Erel B4X founder Staff member Licensed User Longtime User Jun 26, 2016 #2 Please use [code]code here...[/code] tags when posting code. In which way doesn't it work? Upvote 0
U Ulli_53 Member Licensed User Jun 26, 2016 #3 Erel said: Please use [code]code here...[/code] tags when posting code. Click to expand... Sorry, I am new here. I will remember next time. Erel said: In which way doesn't it work? Click to expand... In order to tell you the exact compiler errors with line numbers I put in the same code again. And hey, now it works! I do not know what was wrong before. Nevertheless it works. So it was just a successful test how to share code between B4i and B4A. Thanks for your effort. Upvote 0
Erel said: Please use [code]code here...[/code] tags when posting code. Click to expand... Sorry, I am new here. I will remember next time. Erel said: In which way doesn't it work? Click to expand... In order to tell you the exact compiler errors with line numbers I put in the same code again. And hey, now it works! I do not know what was wrong before. Nevertheless it works. So it was just a successful test how to share code between B4i and B4A. Thanks for your effort.