iOS Question timeparse question

tufanv

Expert
Licensed User
Longtime User
Hello

In b4a i use
B4X:
     Dim a As Long = DateTime.TimeParse(DateTime.Time(DateTime.now))
    Dim b As Long = DateTime.dateTimeParse(gunes&":00")

later i get the time difference with

B4X:
Dim p As Period = DateUtils.PeriodBetween(a,b)

ı use time format hhmmss normally so i add the last :00 to make it okey with the format and it works perfect for b4a.

for b4i we dont have timeparse but datetimeparse and it requires a date. I am a bit confused. Can you please help me achieve what i did in b4a for b4i ?

TY
 

tufanv

Expert
Licensed User
Longtime User
I will answer my own question =)
I changed it to

B4X:
      Dim a As Long = DateTime.dateTimeParse(lbltarih.Text,DateTime.Time(DateTime.now))
    Dim b As Long = DateTime.dateTimeParse(lbltarih.text,gunes&":00")

lbltarih.text = date as string
 
Upvote 0
Top