- Local time
- Today, 10:32
- Joined
- Feb 19, 2013
- Messages
- 17,749
You didn't say that you can provide a demob date in the future.In other words if the DeMobDate is greater than Date() it returns the number of days up until the actual DeMobDate i.e. 23
If that is the case you need to limit the demob date to date-1 if is null or demobdate>date-1