I'm live in Thailand,My Year is 2555 is not 2012 ,I'm tried use Basic4PPC for WindowsMobile. When I click date ,It will be shown 04/02/2012 ,I need to be 04/02/2555 ,How can I do? Please answer the both Basic4Android and Basic4PPC (I have ready to buy Basic4Android)
Best Regards
Theera
:signOops:
Theera,
Since Android only accepts dates up to the year 2100, or thereabouts, the simplest solution would seem to be to wrap any use of the date functions into equivalent BudismDate functions which subtract the 543 year shift before using the standard B4A functions and add the 543 years at the end.
something like:-
B4X:
sub budhism_now as string
dim now as long
dim todayyear, todaymonth, todayday as int
dim todaysdate as string
now = DateTime.Now
todayyear = DateTime.getyear(now) + 534
todaymonth = DateTime.getmonth(now)
todayday = DateTime.getdayofmonth(now)
todaysdate = todaysdate & NumberFormat2(todayday,2,0,0,False) & "/"
todaysdate = todaysdate & NumberFormat2(todaymonth,2,0,0,False) & "/"
todaysdate = NumberFormat2(todayyear,4,0,0,False)
return todaysdate
end sub
Don't know the ins and out of B4PPC, but the principles should be much the same.