Copied to clipboard

Flag this post as spam?

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


  • suzyb 474 posts 932 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 474 posts 932 karma points
    Mar 20, 2012 @ 13:22
    suzyb
    0

    Thank you :D

Please Sign in or register to post replies

Write your reply to:

Draft