Re: AppleScript date in ISO-8601 ?
Re: AppleScript date in ISO-8601 ?
- Subject: Re: AppleScript date in ISO-8601 ?
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 29 Apr 2015 09:39:05 +0200
Le 29/04/2015 à 08:51, emile.a.schwarz < email@hidden> a écrit :
Hi all,
I searched in the Language Guide, etc. but I failed to find a built in way to get dates in ISO-8601 format (SQLDate).
Ideas ?
Emile
on dateToISO(aDate) tell aDate to tell ((its year) * 10000 + (its month) * 100 + (its day)) as text to return text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8 end dateToISO
#=====
on makeStamp(aDate) tell aDate to return (((its year) * 10000 + (its month) * 100 + (its day)) as text) & "_" & text 2 thru -1 of ((1000000 + (its hours) * 10000 + (its minutes) * 100 + (its seconds)) as text) end makeStamp
#=====
do shell script "date +%Y-%m-%d_%H:%M:%S"
do shell script "date +%F_%T"
Yvan KOENIG (VALLAURIS, France) mercredi 29 avril 2015 09:38:13
|
_______________________________________________
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