Patrick Hennessey
Patrick Hennessey

Reputation: 471

Applescript: Pass date function result into variable, without using a handler?

Here's a neat little line that creates a compact date format. The problem is that I don't know how to pass it into a variable to use in my script. I'd like to avoid using a handler. Any ideas?

tell (current date) to tell (year * 10000 + (its month) * 100 + day) as string to text 3 thru 8

Upvotes: 0

Views: 173

Answers (1)

Patrick Hennessey
Patrick Hennessey

Reputation: 471

Nevermind, just got it:

tell (current date) to tell (year * 10000 + (its month) * 100 + day) as string to set myDate to text 3 thru 8

This is the most compact date format I have ever found. Killer!

Upvotes: 1

Related Questions