• 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: Replacing range within a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing range within a string


  • Subject: Re: Replacing range within a string
  • From: g3pb <email@hidden>
  • Date: Tue, 27 Feb 2001 10:01:53 -0900

this will remove the seconds from the current date

set now to characters 1 thru -4 of ((current date) as string) as text

for a more general AppleScript version of Perl's substr you might take a
look at "munge" in Akua Sweets


-- hcir
mailto:email@hidden
Made with a Mac!


> Is there an equivalent of the Perl "substr" command in AS?
>
> More specifically, I'd like to remove the seconds on a "time string of
> (current date)". Is there an easy way to do this?
>
> (something like: set text -6 thru -4 of aTimeString to "")


  • Follow-Ups:
    • Re: Replacing range within a string
      • From: Emmanuel <email@hidden>
    • Re: Replacing range within a string
      • From: Bryan Harris <email@hidden>
References: 
 >Replacing range within a string (From: Bryan Harris <email@hidden>)

  • Prev by Date: Re: Re: Write to file
  • Next by Date: Re: Duplicate and rename folder path
  • Previous by thread: Replacing range within a string
  • Next by thread: Re: Replacing range within a string
  • Index(es):
    • Date
    • Thread