Hello, I am having difficulties setting a time for my alarm to go off. I can get a set date and time, but it's not in the correct format. To do this I need to convert everything to an integer and plug it into a separate syntax. However, I'm having trouble grabbing numbers from a string. This is my code:
An example is setting the date. I can pull up a date in the format of "08/12/2013 15:06" but I need it to be cut into chunks [to plug into starttimeportD1]. How can I get it so
newyear = 2013,
newmonth= 08,
newday = 12
newhour = 15
newmin = 06?
Thanks for any help!
B4X:
Sub whlTime_Closed(Canceld As Boolean, Time As String)
If Canceld = False Then
lblDateTime.Text = lblDateTime.Text & " " & Time
'STARTTIMEPORTD1 = DateUtils.SetDateAndTime(newyear, newmonth, newday, newhour, newmin, 0)
'(starttimeportD1 being the alarm that needs to be set)
End If
End Sub
An example is setting the date. I can pull up a date in the format of "08/12/2013 15:06" but I need it to be cut into chunks [to plug into starttimeportD1]. How can I get it so
newyear = 2013,
newmonth= 08,
newday = 12
newhour = 15
newmin = 06?
Thanks for any help!