Table of Contents

xtFormatDate

Returns a specifically formatted date string from a passed applescript date. If you pass no date to the default parameter then the current date is used. At least one date, time or format string parameter is required or the verb will return an empty string. The Long, Short and Abbreviated times or dates are returned according to the system date/time configuration and your localization settings.

Optional Parameters:

Examples:

write log “long date format: “ & xtFormatDate (last timestamp “a unit”) dateType Long timeType long
write log “the current year is: “ & xtFormatDate formatString “[year]”
write log xtFormatDate formatString “The time is [minute] minutes past the hour of [hour]”
write log xtFormatDate formatString “you have lived through [dayOfYear] days of [year] so far!”