• 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: How to use date of current date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use date of current date


  • Subject: Re: How to use date of current date
  • From: "J. Stewart" <email@hidden>
  • Date: Wed, 31 Oct 2012 17:37:12 -0400

On 10/31/12 at 4:59 AM, emile.a.schwarz <email@hidden> spake thusly:

in the documentation I saw an entry 'date' in the date (class, command, feature, whatever it it called / classified).

 

But I am unable to use it.

 

All I wanted was to see what it returns (certainly the date part of a date like time is the time part of a date).

 

All inputs will be appreciated.

 

TIA,

 

Emile

 

PS: I need to get SQLDate (YYYY-MM-DD) and I feel that I will have to do it by myself…).


Emile,

This is trivial using the shell OR the satimage.osax.

With the osax:

set currTime to strftime (get current date) into "%Y-%m-%d"

As a shell script:

set currDate to do shell script "date '+%Y-%m-%d'" -- mind the quoting


See:
<x-man-page://date> for the command
<x-man-page://strftime> for how to format the date, also applies to the Satimage.osax.

JBS

--
Under a government which imprisons any unjustly, the true place for a just man is also in prison.  -Henry David Thoreau


_______________________________________________
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: 
 >How to use date of current date (From: "emile.a.schwarz" <email@hidden>)

  • Prev by Date: Re: How to use date of current date
  • Previous by thread: Re: How to use date of current date
  • Next by thread: Re: How to use date of current date
  • Index(es):
    • Date
    • Thread