0

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

1 Answer 1

1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.