• 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: Jolly Roger <email@hidden>
  • Date: Tue, 05 Jun 2001 15:09:37 -0500

On 6/5/2001 12:58 PM, "Jolly Roger" <email@hidden> wrote:

> On 6/5/2001 11:47 AM, "email@hidden" <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.
>
> Well, you could always do something like this:
>
> -- begin script
> set timeStr to time string of (current date) as text
>
> set timeStr to ((characters 1 thru ((the length of timeStr) - 1) of timeStr)
> & "." & (character -1 of timeStr) & ".") as text
> -- end script

Or better yet:

-- begin script
set timeStr to time string of (current date) as text

set timeStr to (timeStr's characters 1 thru -2 & "." & timeStr's character
-1 & ".") as text
-- end script

JR


References: 
 >Re: text manipulation (From: Jolly Roger <email@hidden>)

  • Prev by Date: Can't get screenName in AOL IM
  • Next by Date: Re: A reference to problem (solved)
  • Previous by thread: Re: text manipulation
  • Next by thread: Re: text manipulation
  • Index(es):
    • Date
    • Thread