Skip to content
View in the app

A better way to browse. Learn more.

iBotModz

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using timespan get the string to subtract listview sub item

Featured Replies

Hey guys is there any one can help me about this code? I want to Subtract

the value of Listview SubsItem if the String Format in time span got 59

it will automatically subtract 1 for subitem tag

 

Private TimeLaps As Date
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim remainingTime As TimeSpan
For Each itm As ListViewItem In ListView1.Items

If CDate(itm.Tag) > Date.Now Then

remainingTime = CDate(itm.Tag).Subtract(Date.Now)

itm.SubItems(1).Text = String.Format("{0:d2}:{1:d2}:{2:d2}", _
remainingTime.Hours, _
remainingTime.Minutes, _
remainingTime.Seconds)


If itm.Tag(String.Format("{2:d2}").ToString = 59) Then ' <======== This part is the error
itm.SubItems(2).Tag = -1 '<=== and this part of code i want to subtract the text inside of the subitem(2) is
'the total minutes of timespan running.. if the timespan seconds string is 59
'then it will auto deducted the remaining minutes sample 60 minute then deduct 1
'so then remaining minutes left is 59

End If

End If


Next
End Sub

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.