I am having trouble figuring out how to create a field that gives me the amount of days since the last time the customer checked out. For instance, I have James who checked in on 1/8/2014 and checked out on 1/9/2014. He then came back on 1/12/2014. I want to calculate the amount of days since he last came in. It should say its been 3 days since he last came in. I am thinking of using peek commands and previous commands but I can't figure out a way to do this.
Do you know how to sort the dates correctly? I have a client who have been in the system for years and they have 3 same dates but different years. The data is coming up 1/8/2013, 1/8/2012, 1/8/2014 for james.