Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / October 2004



Tip: Looking for answers? Try searching our database.

dateFormat

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
justin.culp - 27 Oct 2004 16:55 GMT
Does anyone know how to format a date from a SQL query?  I have a webservice
that simply gets the results of a query in a CFC throws it in a dataSet and
then my dataGrid displays the data.  One of the fields that is returned is a
date field.  In the SQL table the date reads 10/15/2004 but when displayed in
Flash in my dataGrid the date is Fri Oct 15 00:00:00 GMT-0600 2004.  I
basically want to format the date to look like the date in the SQL table.  I
have read up on schemas and whatnot, and I have the date field formated as date
in my dataSet component schema.  It doesn't seem to do anything to the
formatting at all.  Also, I have read about #include dateFormat.as.  I do not
have that file, everytime I put it in my AS, it says it can't find it.  Any
ideas where I can get that file?

I am running the newest version of flash, 7.2 with all the new remoting
comonent updates and what not.

Thanks.
Keith Dodd - 27 Oct 2004 18:57 GMT
Not sure if you need the date to be an actual date object or not. If not, here
is a function I just used so I could display (string) a date returned from my
CF CFC:

function formatDate(useDate:Date):String {
    var yr:String = useDate.getFullYear().toString().slice(2);
    var myDate:String = ((useDate.getMonth() +1)  +"/"+useDate.getDate() +"/" +
yr);
    return myDate;
}
for the useDate, I passed the date returned from the cfc.

Hope this helps

Keith
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.