in reply to Problem with DateTime subtract_datetime
Thanks for trying to assist me with the DateTime's method, subtract_datetime.
My code was working fine. The problem was with the database call. I was querying the database, based on a user ID,
to obtain the endDate on the user. I was also limiting the result set to 1.
I found there were users that had multiple rows, and the query results were returning the first instance of the result set.
Apparently, each instance of the same user had a different endDate.
But, thanks again for your help.
BTW, you can use accessors to get months, weeks, and days from duration, as I did in the sample code.
|
|---|