Trial Days

Lynch, Jonathan bnz2 at cdc.gov
Thu Jun 30 13:31:36 EDT 2005


If tMonth contain the name of the month in question then this works:

Put lineoffset(tMonth,the monthnames) into initialdate

J.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Robert
Presender
Sent: Thursday, June 30, 2005 1:24 PM
To: use-revolution at lists.runrev.com
Subject: Trial Days

  I would appreciate any comments on the use of internet date instead of

english date for tracking trial days of a distributed application. Bad 
idea .. good idea?

The below works OK but is there a simpler way if internet date would be 
used?
--use internet date instead of english date to
--count number of trial days. Take the difference between
--a start date in seconds and a current date in seconds
--divided by 86400 to get number of days.
function fInternetDate
   put the internet date into hold
   if  "Jan" is in word 3 of hold then put 1 & "/" into initialDate
   if  "Feb" is in word 3 of hold then put 2 & "/" into initialDate
   if  "Mar" is in word 3 of hold then put 3 & "/" into initialDate
   if  "Apr" is in word 3 of hold then put 4 & "/" into initialDate
   if  "May" is in word 3 of hold then put 5 & "/" into initialDate
   if  "Jun" is in word 3 of hold then put 6 & "/" into initialDate
   if  "Jul" is in word 3 of hold then put 7 & "/" into initialDate
   if  "Aug" is in word 3 of hold then put 8 & "/" into initialDate
   if  "Sep" is in word 3 of hold then put 9 & "/" into initialDate
   if  "Oct" is in word 3 of hold then put 10 & "/" into initialDate
   if  "Nov" is in word 3 of hold then put 11 & "/" into initialDate
   if  "Dec" is in word 3 of hold then put 12 & "/" into initialDate
   put word 2 of hold & "/" after word 1 of initialDate
   put word 4  of hold after word 2 of initialDate
   convert initialDate to seconds
   return initialDate
end fInternetDate

Thanks

Regards ... Bob

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list