Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
math with date
#1
Hello,

I like to know if something can be done like this: I have a date in a string, count 10 days with this string and compare it with the current date if the result is in the future it's ok, if not then action can be done.
I know that months have different lengths etc. but cannot figure it out myself. Can somebody help me with this?

Greetings

Sonic
#2
Macro Macro1969
Code:
Copy      Help
DateTime d dNow

d.FromStr("2013-02-01")
d.AddParts(10) ;;add 10 days

dNow.FromComputerTime

if d>dNow
,out "d is in future"
else
,out "action"


Forum Jump:


Users browsing this thread: 1 Guest(s)