• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 2 Sep 2009 18:31:43 +0200


Le 2 sept. 2009 à 18:10:00, Robert Poland a écrit :

Yvan,

Since the times are stored in a file as times, is there a simple way to convert "6:01" to the number 3601?


set textTime to "6:01"
set {h, m} to my decoupe(textTime, ":")
set numTime to ((m as integer) + ((h as integer) * 60))

--=====

on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe

--=====

would return 361 (not 3601).

Yvan KOENIG (VALLAURIS, France) mercredi 2 septembre 2009 18:31:32


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: Robert Poland <email@hidden>
    • Re: date/Snow Leopard changed
      • From: Robert Poland <email@hidden>
References: 
 >date/Snow Leopard changed (From: Robert Poland <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: date/Snow Leopard changed
  • Next by Date: Problem getting table text off PowerPoint slides
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread