Re: Date trouble
Re: Date trouble
- Subject: Re: Date trouble
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 20 Oct 2006 09:41:16 -0400
On 10/20/06, Rob Stott <email@hidden> wrote:
If you're not averse to using a bit of shell scripting then this should do
the job for you...
set theDate to do shell script "date \"+%Y-%m-%d %H:%M:%S\""
Two minor suggestions:
1. I prefer to avoid backslashitis by not using double-quotes inside
"do shell script" if i can help it. Since you're not doing any
shell-level interpolation inside the format string, you can use single
quotes here.
2. Also, both %Y-%m-%d and %H:%M:%S have single-specifier shortcuts.
set theDate to (do shell script "date +'%F %T' ")
Hope that helps
Rob
---
Rob Stott
Production Workflow Developer
Watt Gilchrist Ltd
Albion Mills, Albion Road
Bradford, BD10 9TQ
http://www.gilchrist.co.uk
Internal extension: 467
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden