Changing date format in CalendarWidget100

Devin Asay devin_asay at byu.edu
Thu Sep 10 13:24:29 EDT 2009


Charles,
On Sep 10, 2009, at 10:09 AM, Charles Szasz wrote:

>
> I thought this would be easy but it is not! I want to change the  
> format of
> the date inserted in a field of an application by CalendarWidget100  
> to a
> different format. For example, change 2009,9,10 to Sept 10, 2009.
>
> I was able to change the sequence of the date format from 2009,9,10 to
> 9,10,2009 but changing the month from 9 to name of the month (Sept)  
> is more
> complicated! Does anybody have any suggestions?

You're best off just using the convert command. So if what you're  
getting from CalendarWidget is 2009,9,10, just do something like:

   --assume you put the date from the calendar widget into a variable  
tDate
   put tDate & 0,0,0,0 into tDate -- pad out with zeros to get a  
complete set of date items
   convert tDate to abbreviated date --> it should come out as Thu,  
Sep 10, 2009

Hope this helps.

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list