
Code: Select all
convert date1 to dateItems
convert date2 to dateItems
if date2 > date1 then
answer "date1 is before than date2"
end if
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
convert date1 to dateItems
convert date2 to dateItems
if date2 > date1 then
answer "date1 is before than date2"
end if
Code: Select all
on mouseUp
put "5/9/94" into d1
put "5/9/95" into d2
convert d1 to dateItems
convert d2 to dateItems
if d2 > d1 then answer "date1 is before date2"
else answer "date2 is before date1"
end mouseUp
2014,4,16,10,3,15,4 < 2014,4,16,9,34,50,4
Did you get what Klaus meant? (And what I said?) He makes a very important point.What exactly would you expect when you try to compare 2 STRINGS instead of two (single) numbers?
Code: Select all
on mouseUp
convert the date to dateItems
put it into field 1 -- 2014,4,16,0,0,0,4
add 23 to item 3 of it
put it into field 2 -- 2014,4,39,0,0,0,4
convert it to date
put it into field 3 -- 5/9/14
end mouseUp