J
JFB
Hi All,
I'm trying to find if a file name that includes the date is before todays to
do some procedures.
In my IF statement is working is just a few dates before but not is a year
before.
How can I fix this?
Tks in advance...
This is what I have:
'Set today's date
Dim todayDay As String
If Month(Now) < 10 Then todayDay = todayDay & "0" & Month(Now) Else todayDay
= todayDay & Month(Now)
If Date.Today.Day < 10 Then todayDay = todayDay & "0" & Date.Today.Day Else
todayDay = todayDay & Date.Today.Day
todayDay = todayDay & CStr(Year(Now).ToString)
'Get Files from Spool Folder
objFolder = dir.GetDirectoryRoot(folderName)
colFiles = dir.GetFiles(folderName)
If colFiles(i).Substring(colFiles(i).LastIndexOf("\") + 1, 8) <= todayDay
Then
I'm trying to find if a file name that includes the date is before todays to
do some procedures.
In my IF statement is working is just a few dates before but not is a year
before.
How can I fix this?
Tks in advance...
This is what I have:
'Set today's date
Dim todayDay As String
If Month(Now) < 10 Then todayDay = todayDay & "0" & Month(Now) Else todayDay
= todayDay & Month(Now)
If Date.Today.Day < 10 Then todayDay = todayDay & "0" & Date.Today.Day Else
todayDay = todayDay & Date.Today.Day
todayDay = todayDay & CStr(Year(Now).ToString)
'Get Files from Spool Folder
objFolder = dir.GetDirectoryRoot(folderName)
colFiles = dir.GetFiles(folderName)
If colFiles(i).Substring(colFiles(i).LastIndexOf("\") + 1, 8) <= todayDay
Then
