Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT *, ISNULL(DueDate, DATEADD(year, 10, GETDATE())) AS DueDateForSorting
- FROM Tasks
- ORDER BY DueDateForSorting
- SELECT * FROM Tasks
- ORDER BY ISNULL(DueDate, DATEADD(year, 10, GETDATE()))
- from o in dc.Orders orderby o.DueDate ?? DateTime.Today.AddYears(10)
- [Column(Storage="_DueDate", DbType="SmallDateTime")]
- public System.Nullable<System.DateTime> DueDate
- {
- get
- {
- if(this._DueDate == null)
- {
- return DateTime.Today.AddYears(10);
- }
- return this._DueDate;
- }
Add Comment
Please, Sign In to add comment