Re: How to use date of current date
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