#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0

    Calculations within a view


    Im not sure if this is possible. I want to create a view, but i want the view to include a calculation based on dates, it needs to take a date, check if that date has pasts todays date, if it has i would like a column to indicate 'Overdue'. So for instance, a task is due 31/09/2012 so with todays date being 24/10/2012, this task is now overdue, i would like a column in my view to indicate that this task is overdue.

    Any assistance would be greatly appreciated.
    Regards
    Bongkerz
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,385
    Rep Power
    391
    Code:
    select case when dueDate < current_date then 'Overdue' end ...
    assuming that the name of the date column is dueDate.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0
    Thanks swampBoogie, works perfectly.

IMN logo majestic logo threadwatch logo seochat tools logo