Android Question Convert input mask date

Makumbi

Well-Known Member
Licensed User
B4X:
MaskedEditText2.Text = DateTime.Add(DateTime.Now,0,0,1)

when i add one to todays date this brings this Number 15/45/5552 yet i wanted to display 23/12/2018 because todays date is 22/12/2018
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
B4X:
MaskedEditText2.Text = DateTime.Add(DateTime.Now,0,0,1)

when i add one to todays date this brings this Number 15/45/5552 yet i wanted to display 23/12/2018 because todays date is 22/12/2018
Because .Add returns a long representing ticks. You you need to convert this to a string using .Date.

These methods are all well documented.

-Colin .
 
Upvote 0
Top