hexagon logo

Difference between 2 dates times in Basic Script.

Anyone know of a way to get the difference between 2 date/times in Basic Script? Similar to the datediff function in VBA.
Parents
  • I want you to know that I've been tempted by this challenge a few times, but it is non-trivial. If I had such an example I would surely give it to you. If every month had the same number of days, it would be simply, but you have to convert each month independently, for both dates, and then find the difference in days. The same is true for years, they are not all the same if you cross a leap year. Its not impossible, I just have not done it yet.
Reply
  • I want you to know that I've been tempted by this challenge a few times, but it is non-trivial. If I had such an example I would surely give it to you. If every month had the same number of days, it would be simply, but you have to convert each month independently, for both dates, and then find the difference in days. The same is true for years, they are not all the same if you cross a leap year. Its not impossible, I just have not done it yet.
Children
No Data