I'm having some trouble figuring out how to sort by a date which is not stored in the database but which is calculated on-the-fly on my webpage by adding a number of days to another date.
So we have the following fields in the table UserDetails:
Date (smalldatetime ('dd/mmyyyy')
I am trying to sort my results by DueDate (which is dynamically calculated and not stored as a field in the db) which is Date ('dd/mm/yyyy') + Term (number of days (int) ).
So I am wondering if there is anyway that inside my SELECT in my SQL statement I can actually create a new date AS DueDate which is the above sum?
Anyone have any ideas?