Wish dateadd with MOre than 12 Month

hery71

Member
Licensed User
Hi i m new in B4A and i try to use date operation but it will give me wrong results???
dim dtn as long
DateTime.DateFormat = "yyyy/mm/dd"
dtn = DateTime.Now
log( datetime.date(dtn)) ' it will give for today 2018/18/31 not normally 2018/07/31?????
is it a bugg???? or i do some mistake????
Hery
 

Mahares

Well Known Member
Licensed User
i try to use date operation but it will give me wrong results??
B4X:
DateTime.DateFormat = "yyyy/mm/dd"
must be:
B4X:
DateTime.DateFormat = "yyyy/MM/dd"   'capital
You just joined the forum. You cannot start making speedy remarks about bugs unless you have been around for a while, particularly when you are dealing with DATES and @Erel.
 
Top