Author: jfierst | Posted on: 3/29/2010 9:58:14 AM | Views : 247

I have a site that checks a files creation date then runs some code if the file is over 15 minutes old.  I think I am running into trouble if it is over a day old.  Any help would be appreciated.
Heres my error:
 Conversion from string "2.19:14:34.6673846" to type 'Date' is not valid.
Line 26:         If Minute(diff1.ToString) > 15 Then

Here's my code:
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim MyStamp As Date 'MyStamp = "10/12/2001 4:35:47 PM" MyStamp = FileDateTime("C:\xmlfile2.xml") Dim diff1 As System.TimeSpan ' diff1 gets x days, x hours, and x minutes. diff1 = DateTime.Now.Subtract(MyStamp) ...

Go to the complete details ...