Dates?

Ken Ray kray at sonsothunder.com
Fri Apr 23 16:20:09 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

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

P.S. And no, I'm not going to benchmark it... :-)


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Scott Rossi
> Sent: Friday, April 23, 2004 2:39 PM
> To: nnoydb at excite.com, How to use Revolution
> Subject: Re: Dates?
> 
> 
> Recently, "Kevin" wrote:
> 
> > How do I get a date in the format of MM/DD/YYYY?
> 
> One way:
> 
> function getFormattedDate
>   put the date into tDate
>   put char -4 to -1 of last item of the long date into tYear
>   set itemDel to "/"
>   put tYear into last item of tDate
>   set numberFormat to 00
>   add 0 to item 1 of tDate
>   add 0 to item 2 of tDate
>   return tDate
> end getFormattedDate
> 
> I wonder if this will turn into another programming showdown... :-)
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, Development & Design
> -----
> E: scott at tactilemedia.com
> W: http://www.tactilemedia.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list