Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im trying to get a query to work like this:
Model.Children.Where("Visible").Where("ExpireDate > DateTime.Now").OrderBy("CreateDate descending");
It's not happy. Any ideas?
(Yes, I know it's horrible. But, the feed from the client keeps including 'expired' content, so it gets republished with an expiry date in the past)
Hi Tony,
I think you just need to combine your 2 .Where methods into 1, so you would have:
Model.Children.Where("Visible && ExpireDate > DateTime.Now").OrderBy("CreateDate descending");
Hope that sorts it out?
Thanks,
Jeavon
Just wanted to confirm that ExpireDate is a custom property you have added to your document type and you're not trying to access the standard "Remove At" date property?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Using ExpireDate
Im trying to get a query to work like this:
It's not happy. Any ideas?
(Yes, I know it's horrible. But, the feed from the client keeps including 'expired' content, so it gets republished with an expiry date in the past)
Hi Tony,
I think you just need to combine your 2 .Where methods into 1, so you would have:
Hope that sorts it out?
Thanks,
Jeavon
Just wanted to confirm that ExpireDate is a custom property you have added to your document type and you're not trying to access the standard "Remove At" date property?
is working on a reply...