Skip to content

Instantly share code, notes, and snippets.

@drusellers
Created October 2, 2009 21:18
Show Gist options
  • Save drusellers/200145 to your computer and use it in GitHub Desktop.
Save drusellers/200145 to your computer and use it in GitHub Desktop.
<ExtentionMethod()> _
Public Sub DuringTheDay(ByVal crit As ICriteria, ByVal dateToUse As DateTime)
Dim min As DateTime = New DateTime(dateToUse.Year, dateToUse.Month, dateToUse.Day, 0, 0, 0)
Dim max As DateTime = New DateTime(dateToUse.Year, dateToUse.Month, dateToUse.Day, 23, 59, 59)
crit.Add(Expression.Between("DatePublished", min, max))
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment