Trial Days

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trial Days

Robert Presender
  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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Trial Days

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

Put lineoffset(tMonth,the monthnames) into initialdate

J.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Robert
Presender
Sent: Thursday, June 30, 2005 1:24 PM
To: [hidden email]
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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Trial Days

Robert Presender
In reply to this post by Robert Presender
Thanks to Jonathan Lynch and Robert Brenstein for your input.
Trial days now down to 4 lines.

Regards .. Bob

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Trial Days

Sarah Reichelt
In reply to this post by Robert Presender
>  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?
>
I don't see the need for this amount of code. Why do you not want to  
use the English date? I like it because it is a consistent format no  
matter what system settings are in place.

If I really want to be sure that "convert" is doing the right thing,  
I specify the "from" format e.g. convert myDate from short English  
date to seconds.

Cheers,
Sarah

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Trial Days

Robert Presender
In reply to this post by Robert Presender
Hi Sarah and thanks,

On Fri, 1 Jul 2005  Sarah Reichelt wrote
snip

> I don't see the need for this amount of code. Why do you not want to
> use the English date? I like it because it is a consistent format no
> matter what system settings are in place.

I had assumed from reading the internet keyword doc that this date form
would not be tied to the system date. I made the wrong assumption. I
should have checked this out before.
I could make an excuse because of age instead of stupidity!  I have
used English date.

> Cheers,
> Sarah

Regards ... Bob

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Trial Days

Bob Hartley
In reply to this post by Robert Presender
You wrote:

> Thanks to Jonathan Lynch and Robert Brenstein for your input. Trial days
> now down to 4 lines.

Hi Bob

Could you post your final code. I'd be interested.

Cheers
Bob; Sunny Scotland
>
> Regards .. Bob
>
> _______________________________________________ use-revolution mailing
> list [hidden email] Please visit this url to subscribe,
> unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Trial Days

Robert Presender
In reply to this post by Robert Presender
Hi Bob,

I made several wrong assumptions about Internet date which I assumed
would be independent of the system date.  This is not the case.

To answer your inquiry (enter the below in the message box or make it
into a handler or ....

get the internet date
convert it to dateItems
convert it from dateItems to short date
convert it to seconds
put it --to read the result in the message box

I am back to using English date which is even shorter:

get the english date
convert it to seconds
put it

Regards ... Bob

On Jul 10, 2005, Bob Hartley wrote:

> You wrote:
>
>> Thanks to Jonathan Lynch and Robert Brenstein for your input. Trial
>> days
>> now down to 4 lines.
>
> Hi Bob
>
> Could you post your final code. I'd be interested.
>
> Cheers
> Bob; Sunny Scotland
>>
>> Regards .. Bob
>>

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