I'm struggling to figure out how to remove 5 days from today ...
I have the following simple code that searches, compares the search result of an array of text files, and then compares them with today's date. If the date in the text file is older than today, it is deleted, if not.
I want, however, to say if the date in the text file is 5 days or older, and then delete.
It is used in the English date format.
Sub KillSuccess() Dim enUK As New CultureInfo("en-GB") Dim killdate As String = DateTime.Now.ToString("d", enUK) For Me.lo = 0 To UBound(textcis) If textcis(lo).oDte < killdate Then File.Delete(textcis(lo).oPath & ".txt") End If Next End Sub
thanks
source share