|
Mailing Lists
|
Home /
Groups /
ColdFusion Flash (CF-Flash)
Datefield on the Flash Form is not displaying date properly
Hi,Bart Zolnowski 04/02/07 06:27 P What is the mask attribute set to?Chris Velevitch 04/02/07 10:42 P Hi,Bart Zolnowski 04/03/07 09:49 A Hi,Bart Zolnowski 04/03/07 11:14 A You might have been better off finding a way to format them as changing theAdrian Lynch 04/03/07 11:25 A I'm new to Flash forms in CF, but in regular Flash you can use formatterAdrian Lynch 04/03/07 11:50 A Here's a snippet right out of the dw reference... just easier than me typingCharles W. Anderson 04/03/07 11:56 A I have tried DateFormat() and mask and none of them worked.Bart Zolnowski 04/03/07 12:06 P How do the dates actually look as raw data in the database? And how are youCharles W. Anderson 04/03/07 12:12 P Hi Chris,Axel Schultze 03/11/08 10:04 P The cfinput tag a an attribute "mask" and you should sayChris Velevitch 03/11/08 10:26 P Hi, I am having the problem with the date field being pulled from the database using FlashForms. I am able to send the date across such as 03/01/07 but when I am looking up my date on the grid and form below the date shows up in the long format such as March 1 00:00:00 GMT-0600 2007 I have been trying mask, dateformat and none of them worked. This is what I am currently using <cfinput type="datefield" required="yes" name="date_assigned" label="Date Assigned: " width="250" size="30" maxlength="30" bind="{CoursesGrid.dataProvider[CoursesGrid.selectedIndex]['date_assigned']}" > I am trying to get it formatted as mm/dd/yyyy when pulling from the database. Please help, Bart What is the mask attribute set to? Chrfis -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au Hi, I set it up originally to mm/dd/yyyy but I took it off since it did not work. I had the date to come by using dateformat() function up on the form once but it kept displaying the same date from the database for every single record. bind="{CoursesGrid.dataProvider[CoursesGrid.selectedIndex]['#dateformat(course_list.date_qa,"mm/dd/yyyy")#']}" value="#dateformat(course_list.date_qa,"mm/dd/yyyy")#" > This is the closest I got, but then even though it would submit the right date to the database in the right format it would not display it properly on the flash form so I decided to stick to bind="{CoursesGrid.dataProvider[CoursesGrid.selectedIndex]['date_qa']}" > until i can find the solution. However with the long format I have to redesign the database due to the fact that it does not fit the definition of the date I wanted to store originally in the database. I have to make it to accept most likely strings or long dates (if they exist — I will have to check in the documentation). I kept reading about it and it seems that nobody has solution to it as of yet and everybody keeps having the same problem with the flash forms. Does anybody know how to solve this? Thanks ----- Excess quoted text cut - see Original Post for more ----- Hi, I finally figured it out. All it took was to change the field types in my database (I am using PostgreSQL). By common sense I desgined the fields to be "date" and never even thought that it would cause the problem. So I just re-designed the database by changing "date" fileds to "varchar" and everything works perfect. Thanks for help, Bart ----- Excess quoted text cut - see Original Post for more ----- au You might have been better off finding a way to format them as changing the column to varchar might cause problems elsewhere. Or, return another column that's formatted as you need it SELECT MyDateColumn, YOUR_DB_CONVERT_FUNCTION(MyDateColumn) MyDateColumnString FROM .... That way you keep the column as Date and still get around the trouble you're having with Flash. Adrian Hi, I finally figured it out. All it took was to change the field types in my database (I am using PostgreSQL). By common sense I desgined the fields to be "date" and never even thought that it would cause the problem. So I just re-designed the database by changing "date" fileds to "varchar" and everything works perfect. Thanks for help, Bart ----- Excess quoted text cut - see Original Post for more ----- I agree that this is not the best solution to go about, but I do not have the need for date comparison and such and I have spent way too much time researching the problem. As of right I could not find a single solution without altering the database that coldfusion would allow format the date properly. I am still waiting for the fix with the code rather than going around and "altering" the database :) Thanks Bart ----- Excess quoted text cut - see Original Post for more ----- I'm new to Flash forms in CF, but in regular Flash you can use formatter functions (probably named something else) that will change the displayed data in components. I think I remember this working in Flash forms too. I've not been following this thread so sorry if I'm repeating what's already been said :) I agree that this is not the best solution to go about, but I do not have the need for date comparison and such and I have spent way too much time researching the problem. As of right I could not find a single solution without altering the database that coldfusion would allow format the date properly. I am still waiting for the fix with the code rather than going around and "altering" the database :) Thanks Bart ----- Excess quoted text cut - see Original Post for more ----- you're ----- Excess quoted text cut - see Original Post for more ----- Here's a snippet right out of the dw reference... just easier than me typing out the possible format examples... hope it helps. <cfset todayDate = Now()> <body> <h3>DateFormat Example</h3> <p>Today's date is <cfoutput>#todayDate#</cfoutput>. <p>Using DateFormat, we can display that date in different ways: <cfoutput> <ul> <li>#DateFormat(todayDate)# <li>#DateFormat(todayDate, "mmm-dd-yyyy")# <li>#DateFormat(todayDate, "mmmm d, yyyy")# <li>#DateFormat(todayDate, "mm/dd/yyyy")# <li>#DateFormat(todayDate, "d-mmm-yyyy")# <li>#DateFormat(todayDate, "ddd, mmmm dd, yyyy")# <li>#DateFormat(todayDate, "short")# <li>#DateFormat(todayDate, "medium")# <li>#DateFormat(todayDate, "long")# <li>#DateFormat(todayDate, "full")# </ul> </cfoutput> Charles W. Anderson Mr@CharlesWAnderson.com 941.448.5447 Cellular 941.876.6635 Home/Office 888.MyIT.311 Toll-Free http://www.cf-flash.com Under Construction! http://www.MyIT311.com Under Construction! I'm new to Flash forms in CF, but in regular Flash you can use formatter functions (probably named something else) that will change the displayed data in components. I think I remember this working in Flash forms too. I've not been following this thread so sorry if I'm repeating what's already been said :) I agree that this is not the best solution to go about, but I do not have the need for date comparison and such and I have spent way too much time researching the problem. As of right I could not find a single solution without altering the database that coldfusion would allow format the date properly. I am still waiting for the fix with the code rather than going around and "altering" the database :) Thanks Bart ----- Excess quoted text cut - see Original Post for more ----- you're ----- Excess quoted text cut - see Original Post for more ----- I have tried DateFormat() and mask and none of them worked. Thanks Bart ----- Excess quoted text cut - see Original Post for more ----- How do the dates actually look as raw data in the database? And how are you trying to get them to display in the flash form application? Charles W. Anderson Mr@CharlesWAnderson.com 941.448.5447 Cellular 941.876.6635 Home/Office 888.MyIT.311 Toll-Free http://www.cf-flash.com Under Construction! http://www.MyIT311.com Under Construction! I have tried DateFormat() and mask and none of them worked. Thanks Bart >Here's a snippet right out of the dw reference... just easier than me typing ----- Excess quoted text cut - see Original Post for more ----- already ----- Excess quoted text cut - see Original Post for more ----- Hi Chris, even so it is an older post - but I'm interested how you solved the flash date format issue. bind="{GridUnit2.dataProvider[GridUnit2.selectedIndex]['#dateformat(registerdate,"mm/dd/yy")#']}" value="#dateformat(registerdate,"mm/dd/yy")#" doesn't work for me either. Thanks Axel ----- Excess quoted text cut - see Original Post for more ----- au The cfinput tag a an attribute "mask" and you should say mask="dd/mm/yyyy" or whatever you want. See the documentation on the cfinput tag for details on masking values. ----- Excess quoted text cut - see Original Post for more -----
|
May 20, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||