Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-09-2004, 05:47 PM   #1
idpexec
Senior Member
 
Join Date: Apr 2003
Posts: 111
Default using formatter in component binding

Hello,

I am working on a small application that uses a field from a mysql table where the field type is date.

I would like to use the datefield compontent to change the field in my table, however the format of the datefield component is not the same as required by mysql.

if I use the following actionscript, I can change the format of the datefield component, but this is only for the text output. I would like to take advantage of the formatter option within the bindings tab.

ActionScript Code:
my_datefield.dateFormatter = function(d: Date) {         return d.getFullYear()+"/ "+(d.getMonth()+1)+"/ "+d.getDate();     };

By using the formatter option, I can bind the datefield to my dataset and not have to worry about writing all sorts of functions to do it manually.

Any ideas how to write my AS from above into a little formatter for my datafield?

Thanks,
Howie
idpexec is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:08 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.