Hi All,
I am trying to make this query in my code,
SELECT MAX(dateruleto) FROM dbo.PackageRulesDateBreak
WHERE dateruleto <= '16-SEP-2008'
However I cant quite see how to make it work. This is part of a function i have
The code is in-complete becuase I am stuck
Private Function SplitDates(ByVal iPackageID As Integer, _
ByVal iPackageNights As Integer, _
ByVal dtFromDate As Date, _
ByVal dtToDate As Date) As Date
Dim PackageDates As New PackageRulesDateBreakCollection()
Dim metaData As New LinqMetaData()
Dim max = metaData.PackageRulesDateBreak _
What I want to do is return the max 'PackageRulesDateBreak .DateTo' which is <= to the var dtFromDate which is passed in ByVal in the Function Signature.
I have looked at the documentation but I cant work it out. There is a line in the docs that says "Dim max = metaData.Order.Max(Function(o) o.OrderDate)" but I dont get that at all. sorry if I am missing something real easy here.
Any help would be great. Thanks
Jason