• 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: Time/Date stamping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time/Date stamping


  • Subject: Re: Time/Date stamping
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 09 Aug 2002 13:58:01 -0400
  • Organization: [very little]

> Date: Fri, 09 Aug 2002 17:24:03 +0100
> Subject: Re: Time/Date stamping
> From: Steve Thompson <email@hidden>
> To: Jeff Davison <email@hidden>,
> "email@hidden"
> <email@hidden>
>
> On 9/8/02 4:48 pm, "Jeff Davison" <email@hidden> wrote:
>
> > I would like to add the current time to a file name and I am unclear on what
> > the best solution would be.
>
> set the time_index to the time of the (current date)
> set the hour_index to ((the time_index) / hours) div 1
> set the minute_index to (((the time_index) / minutes) - (the hour_index *
> 60)) div 1
> set the seconds_index to ((the time_index) - (the hour_index * 3600) - (the
> minute_index * 60)) div 1
> set filename to "Filename " & hour_index & "-" & minute_index & "-" &
> seconds_index
>
> -->"Filename 17-22-16"
>
> Watch for line breaks
>
> > For example: "Filename10:23:34:02:12:02"
>
> You can't use colons in file names. I've used hyphens.

If you've got Akua Sweets installed (e.g. not OS X) you can do it in one line:

set fileName to "Filename " & (the clock using form "%y-%m-%d-%h-%i-%s")

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[8/9/02 1:56:09 PM]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Open For Access Broken in 9?
  • Next by Date: Re: Open For Access Broken in 9?
  • Previous by thread: Re: Time/Date stamping
  • Next by thread: Re: Time/Date stamping
  • Index(es):
    • Date
    • Thread