Hi Erel,or all
refer to this
I 've change to my library which supported both of English and Thai. I have problem about using. This is my coding
p.s. In my library,I've save both of the label1.tag and the label2.tag is format dd/MM/yyyy
refer to this
I 've change to my library which supported both of English and Thai. I have problem about using. This is my coding
B4X:
Sub Activity_Create(FirstTime As Boolean)
label1.Initialize("ShowtheCalendar")
Activity.AddView(label1,30,40,190,50)
label2.Initialize("ShowtheCalendar")
Activity.AddView(label2,30,140,190,50)
btnCal.Initialize("btnCal")
Activity.AddView(btnCal,30,300,190,50)
btnCal.Text="Diff of date is"
adp.Initialize
adp.AddToActivity(Activity, label1,True,True) 'Using English = False / Thai = True,ShowShortMonth = True
adp.AddToActivity(Activity, label2,True,True)
End Sub
Sub btnCal_Click
Dim result As String
Log(label1.Tag)
Log(label2.Tag)
result = (DateTime.DateParse(label1.Tag)-DateTime.DateParse(label2.Tag))/(DateTime.TicksPerDay)
result = Abs(result)
result = NumberFormat(result,0,0) & "days"
End Sub
Sub ShowtheCalendar
adp.Show
End Sub
p.s. In my library,I've save both of the label1.tag and the label2.tag is format dd/MM/yyyy
Last edited: