sorting multiple datetime fields when 1 could be empty (null)
Hi you all,
I'm a beginning Umbraco developer and have the following question.
I've created a news-section in my website. Nothing new and working fine. Except now I wanna sort the news items by date. One problem is that the sorting dates are spread over multiple columns. I've create a news date which isn't mandatory. When the newsdate column is empty the created date is used.
how do I sort my newsItems using both of these column
Example
newsitem1: newsdate = 3 aug 2012, createDate = 7 aug 2012
newsitem2: newsdate = emtpy, create date = 7 aug 2012
newsitem3: newsdate = 25 jul 2012, createDate 7 aug
sorting multiple datetime fields when 1 could be empty (null)
Hi you all,
I'm a beginning Umbraco developer and have the following question.
I've created a news-section in my website. Nothing new and working fine. Except now I wanna sort the news items by date. One problem is that the sorting dates are spread over multiple columns. I've create a news date which isn't mandatory. When the newsdate column is empty the created date is used.
how do I sort my newsItems using both of these column
Example
newsitem1: newsdate = 3 aug 2012, createDate = 7 aug 2012
newsitem2: newsdate = emtpy, create date = 7 aug 2012
newsitem3: newsdate = 25 jul 2012, createDate 7 aug
Result (sorting order):
newsitem2, newsitem1, newsitem3
is working on a reply...