I am trying to get the difference from a date value stored on a database as Date.
So i thought to use the DateDiff function:
Private function NewFromDate (byval FromDate as Date) As Long
Dim DateFromDate As Date = New Date(FromDate) ' Passed in value with error
Dim DayDifference As Long = DateDiff(DateInterval.Day, DateFromDate, Now)
Return DayDifference
End Function
I then get the error 'Date' cannot be converted to 'Long'. Although i understand why im not sure what other methods i could use to get the above day difference?
Thanks
...
Go to the complete details ...