Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ilfoken
Starting Member
2 Posts |
Posted - 2013-03-28 : 11:56:19
|
Hello, I am trying to write an Aging report. I have two bound fields (due date) and (Invoice Amount), two alias fields (31-60 days) and (>60 Days) and I would like to show the Invoice Amount value in the two alias fields if the due date is within the range based on today (or current) date. This is what I tried for the alias fields (31-60 days) but got empty values;= iif(datediff("d",fields!duedate.Value,now())>=31 and datediff("d",fields!duedate.Value,now())<=60,fields!valuehome_1.Value,"")Note: due date is equal to different dates (i.e. 02/15/2009, 04/23/2012 or 03/01/2013, etc.)Can someone help me with the correct syntax for this requirement. Thank you.IK |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-28 : 12:21:36
|
whats datatype of duedate field?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
ilfoken
Starting Member
2 Posts |
Posted - 2013-03-28 : 13:54:07
|
Datetime |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-29 : 14:09:26
|
does duedate happen in future or in past? i hope its passed in which case what you've should work------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|