Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Computed Column Date Comparison expression not working
Migrateduser
Hello,
I?m trying to create a computed column that produces a string status based upon the comparison of date field in the database. To get the STATUS, it needs to compare the DUE_DATE to the present day and determine if it is LATE, ON TIME, or EARLY
For example, if the present day is 2013-01-11, then the computed column should look like this:
DUE_DATE | STATUS
|
2012-12-12 | LATE
2012-01-11 | ON TIME
2014-01-01 | EARLY
Unfortunately with my computed column expression, no matter what value the DUE_DATE has, STATUS just remains blank.
Obviously I am doing something wrong, but I can?t figure out what. Here is my expression:
if (row["DUE_DATE"] < BirtDateTime.today())
"EARLY";
else
if(row["DUE_DATE"] == BirtDateTime.today())
"ON TIME";
else
if(row["DUE_DATE"] > BirtDateTime.today())
"LATE"
Is there a better way to compare dates or am I doing something else wrong?
Thanks!
Find more posts tagged with
Comments
There are no comments yet