I use this shell script inside applescript:
set Date to (do shell script "date '+%Y-%m-%d'-'%T'")
return Date
It returns this:
"2012-02-15-16:01:05" #[year, month, day and time]
Is there some way to reformat the time to 16:01:05 to 16-01-05. (Obviously I could do a regex on the output, but that will be messy.)
A typical solution using the standard date formatting params is
Not sure why you have two separate strings in your original i.e.
'+%Y-%m-%d'-'%T'I hope this helps.