Sub Activity_Create(FirstTime As Boolean)
DateTime.TimeFormat = "HH:mm"
Dim td As TimeDialog
td.Is24Hours = True
Dim StartTime,FinishTime, TotalTime, EachPeriod As Long
td.Show("Enter Start Time","Start Time","OK","Cancel","",Null)
Dim StartTime As Long = td.TimeTicks
td.Show("Enter Finish Time","Start Time","OK","Cancel","",Null)
FinishTime = td.TimeTicks
TotalTime = FinishTime - StartTime
EachPeriod = TotalTime / 3
Dim FirstPeriodStarts, SecondPeriodStarts, ThirdPeriodStarts As Long
FirstPeriodStarts = StartTime
SecondPeriodStarts = FirstPeriodStarts + EachPeriod
ThirdPeriodStarts = SecondPeriodStarts + EachPeriod
Log(DateTime.Time(StartTime)) 'These values all correct
Log(DateTime.Time(SecondPeriodStarts))
Log(DateTime.Time(ThirdPeriodStarts))
Log(DateTime.Time(FinishTime))
Log(DateTime.Time(TotalTime)) 'Does not work!
End Sub