AppleScript tip: how to get the current date

By Alvin J. Alexander, devdaily.com

A frequent AppleScript question I've been asked is "How do I get the current date?", or "How do I get today's date?"

The short answer is just to use code like this: (current date). And here's an example of how to use this:

display dialog (current date) as string

This example gets the current date, and then displays it in a dialog.


devdaily logo