Re: date calculations
Re: date calculations
- Subject: Re: date calculations
- From: Andrew Oliver <email@hidden>
- Date: Thu, 10 Mar 2005 14:06:18 -0800
On 3/10/05 1:56 PM, "Christian Vinaa" <email@hidden> wrote:
> from apples website I got:
>
> set timeInvestment to (current date) - (date "tirsdag 1. marts 2005 20:00:00")
>
> this works ok as it calculates time between the 2 dates
>
> i can get it in seconds, minutes, hours whatever no problem there
>
>
> but I have a text file ( textEdit) where I have a list of fx
>
> START: lørdag 5. marts 2005 09:10:06
> END: lørdag 5. marts 2005 09:52:56
>
> ( its just a basic log in and log out )
>
> set myDt to characters 8 through 36 of item 3 of item 1 of emailList as text
> set timeInvestment to (current date) - myDt
>
> but script wont recoqnize myDt as a proper date
But it isn't a date, it's a string. You need to get AppleScript to coerce it
to a date first:
set timeInvestment to (current date) - date myDt
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Follow-Ups:
- reg ex's
- From: Christian Vinaa <email@hidden>