Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • suzyb 464 posts 877 karma points
    Mar 20, 2012 @ 13:06
    suzyb
    0

    Comparing dates

    How can I compare a date with one from another node.  I have a settings node with a lastSent date and want to select only news articles since that date.

    This is what I have but it gives me a syntax error.

    @Model.Descendants("NewsArticle").Where("Visible && articleDate > " + @settingsNode.newsletterLastSent).OrderBy("articleDate desc")

    Can anyone help fix it.

  • Rodion Novoselov 694 posts 859 karma points
    Mar 20, 2012 @ 13:21
    Rodion Novoselov
    0

    Hi. Try it:

    ...Where("Visible && articleDate > @0", settingsNode.newsletterLastSent)...

     

  • suzyb 464 posts 877 karma points
    Mar 20, 2012 @ 13:22
    suzyb
    0

    Thank you :D

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies