Compare two dates

Eric Chatonet eric.chatonet at sosmartsoftware.com
Tue Oct 28 05:12:23 EDT 2008


Bonjour Bill,

Le 28 oct. 08 à 05:28, Bill Vlahos a écrit :

> If I put the following in the message box the result is false as it  
> should be:
> put  "10/12/2008"<"10/04/2008"
>
> However, if I put this in the message box the result is true which  
> is wrong because of not having the leading 0:
> put  "10/12/2008"<"10/4/2008"
>
> Is there a simple command to compare the two items as dates or do I  
> have to convert them to something like seconds with extra code?

You have to convert 'from date to seconds' before comparing.
Sarah has written a nice 'DateTime' library that will help you a lot:
http://www.troz.net/Rev/libraries.php

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list