• 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: Current date in standard additions dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current date in standard additions dictionary


  • Subject: Re: Current date in standard additions dictionary
  • From: Andy Wylie <email@hidden>
  • Date: Mon, 04 Jun 2001 13:12:28 +1200

on 4/6/01 4:07 AM, email@hidden at email@hidden wrote:

> I want to get the time only from current date command, without the seconds
> added. Does anybody know if/how I can do this? Thanks.
>
> John

this should remove seconds regardless of formatting...

set t to time string of (current date)
if text item 5 of t is ":" then --check for colon if no leading zero
set x to 4
else
set x to 5
end if
if "M" is in t or "m" is in t then --12 or 24 hr
set t to {text 1 thru x, text -3 thru -1} of t
else
set t to text 1 thru x of t
end if
t as string

_____________________________ Andy


References: 
 >Current date in standard additions dictionary (From: email@hidden)

  • Prev by Date: Re: Calling other OSA Scripts
  • Next by Date: Re: Current date in standard additions dictionary
  • Previous by thread: Re: Current date in standard additions dictionary
  • Next by thread: Re: Current date in standard additions dictionary
  • Index(es):
    • Date
    • Thread