Dates?
Ken Ray
kray at sonsothunder.com
Fri Apr 23 16:26:29 EDT 2004
> How about:
>
> function getFormattedDate pDate
> put pDate into tLongDate
> convert pDate to system date
> convert tLongDate to long date
> set the itemDel to "/"
> put word -1 of tLongDate into item -1 of pDate
> return pDate
> end getFormattedDate
Nevermind, this is OS-dependent (it only worked properly on OS X). Here's a
revised one that works on all platforms:
function getFormattedDate pDate
convert pDate to dateitems
set the numberFormat to "00"
put ((item 2 of pDate)+0) & "/" & ((item 3 of pDate)+0) & "/" & item 1 of
pDate into pDate
return pDate
end getFormattedDate
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list