• 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: Getting time Stamp from Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting time Stamp from Applescript


  • Subject: Re: Getting time Stamp from Applescript
  • From: Doug McNutt <email@hidden>
  • Date: Thu, 4 Dec 2008 14:38:40 -0700

At 16:07 -0500 12/4/08, Troy, Drew wrote:
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_9CC1F846C11C5C4CA7BAADC5CF0071D2012F898E72D4FACCMS1itmu_"

Hmmm.  Prepared using Microsoft Office.  Sigh.


I have been trying to get a timestamp from AppleScript but I only seem to be able to get it in the form or "December 4, 2008Š". I would like to be able to get it in the form of "2008-12-02 16:03:45.180" so that I can perform some SQL queries with it.

Does anyone know how to get a date to look like that from AppleScript.


Have a look at the UNIX date command. Use: man date in Terminal.app

It refers to yet another man page for the formats but it's nearly
capable of what you want. I'm not so sure about the milliseconds part
and that's likely not to be accurate anyway due to process scheduling
in your Mac.

do shell script  quoted form of (date  "+%y-%m-%d %H:%M:%S")

would be a good start but I probably have AppleScript formatting
problems there.

--

--> A fair tax is one that you pay but I don't <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Getting time Stamp from Applescript (From: "Troy, Drew" <email@hidden>)

  • Prev by Date: Getting time Stamp from Applescript
  • Next by Date: Re: Sequential renumbering in InDesign CS3
  • Previous by thread: Getting time Stamp from Applescript
  • Next by thread: Re: Getting time Stamp from Applescript
  • Index(es):
    • Date
    • Thread