
Try this Dim dpReturn As Date = CType(Me.dpReturnDate.Value, Date) Dim dpDue As Date = dpDueDate.Value Dim dpReturn As Date = dpReturnDate.Value Dim dpDue As Date = CType(Me.dpReturnDate.Value, Date) Dim MyDifference As TimeSpan MyDifference = dpReturn.Subtract(dpDue) ' find the number of days apart On Thu, Aug 25, 2011 at 1:06 PM, MICHAEL AKUNGA <michaelakunga@gmail.com>wrote:
I intend to get the difference of days between two given dates unfortunately all methods have used are firing an exception especially on type casting a string to date so far have used *DateTime.parse() and DateDiff() anyone any idea*
-- MICHAEL A. AKUNGA (+254) 0726 174 815 michaelakunga@gmail.com michaelakunga@yahoo.com
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Justus +254 724 46 55 99