Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time span in days (decimal)
#1
I wonder whether there exists a function to find the difference between two time-stamps. At present I use :

Macro temp10
Code:
Copy      Help
DateTime xde xsa xan
xan.FromStr("13-07-08 12:00:10")
xsa.FromStr("10-07-08")
xde=xan    -xsa
double ddiff=xde
ddiff=ddiff/10000000/60/60/24 ;; days
out F"Decay in days: {ddiff%%12.5f}"

I have tried also TimeSpanGetPartsTotal(long'xde long'ddays)

but I failed to convert long'ddays to a double variable.

Any advice is much appreciated.
#2
If need days difference like 1096.50012, such function does not exist. TimeSpanGetPartsTotal returns 1096.
#3
Many thanks. I will then use my function. Best Regards!


Forum Jump:


Users browsing this thread: 1 Guest(s)