• 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: text manipulation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text manipulation


  • Subject: Re: text manipulation
  • From: Greg Strange <email@hidden>
  • Date: Tue, 05 Jun 2001 13:44:54 -0500

on 6/5/01 11:47 AM, email@hidden at email@hidden wrote:

> I have a time string as follows "10:56 am". I have been trying to figure out a
> way to change "am" to "a.m." or to "a.m", with no luck : ). Anybody have a
> clue? Thanks.
>
> John
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users

set theTime to "10:56 am"
set AppleScript's text item delimiters to " "
set timeParts to the text items of theTime
repeat with i in item 2 of timeParts
set dottedMeridian to dottedMeridian & i & "."
end
set outTime to item 1 of timeParts & " " & dottedMeridian


Hope that helps. And of course, I am on a Windows machine at work so that
is completely untested.

Greg Strange
--
Dysfunction:
The only consistent feature of all your
dissatisfying relationships is you.


References: 
 >text manipulation (From: email@hidden)

  • Prev by Date: Re: text manipulation
  • Next by Date: Re: text manipulation
  • Previous by thread: Time manipulation
  • Next by thread: Re: text manipulation
  • Index(es):
    • Date
    • Thread