cf_twoselectsrelated

Hi, I use the tag CF_TwoSelectsRelated that works very well. But my second field is a date field, and the output in the select option looks like this"2007-10-27 00:00:00.0'. I try to format it to look like '27/10/2007. I tried all instances of #DateFormat(date, "mm/dd/yyyy") # in the name2 fields, the field Display2 and the Value2. I also went into the 2 selects and tried them in the section of attributes.name and other places. I tried to change the format in my application just for fun and giggles. Then I tried to make a table that has shaped the date correctly but the CF_TwoSelectsRelated tag doesn't seem to work with a table. Any thoughts? I will attach my request and the tag SEE if that's any help. Thank you, Wendy

No, I wouldn't change the database format. It should be kept as a datetime column. What I wanted, it was using a db function in your query to format the results.

IIRC sybase has a similar to ms sql convert() function. It takes 3 parameters: column name, data type and date style. 101 style represents US date mm/dd/yyyy format. I don't remember if the year is 2 or 4-digit.

In ms sql you can use it like this

SELECT convert (varchar, yourDatetimeColumn, 101) AS yourDatetimeColumn
FROM YourTable

Tags: ColdFusion

Similar Questions

  • Default CF_TwoSelectsRelated

    How have they a preset default value using cf_twoselectsrelated?

    I use the default fields, but nothing is selected when the page is loaded.

    Thanks for the tips.

    Thanks for the tip.  I put this line rather than attributes.field1 comment:

    I also used emptytext1 instead of path1.

  • Switch dynamically fill

    Is it possible to have a selector_2 filtered from what I have stated in a selection in selector_1, dynamically, without refreshing the page on the #1 being selected first.

    EXAMPLE, in selector_1, I have a list of types of food to a table, pasta, meat, vegetables, etc. I select pasta. Selector_2 should use #1 selection to filter and limit its own list of all foods to the only types of pasta (spaghetti, fettucine, penne, etc.). I have a good idea how to proceed. But, my question is: with CF, it is essential that the page refresh after #1 to "define" this id # 1. Or, is it possible to have the filter from #1 to #2 as long as selector_1 has a selected item?

    I hope that all makes sense. I try just shortened my learning curve by the way not days trying to do is basically impossible.

    Thank you!

    It is called CF_TwoSelectsRelated:

    http://www.Adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&EXTID=1000288

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com

    "Dan Bracuk" wrote in message
    News:flrghh$O31$1@forums. Macromedia.com...
    > You can do with javascript. If you do a search on Google Advanced Group
    > for
    > anything by me including the etiology of Word, you should find an example.
    >
    > There is also a custom tag there called TwoSelectsRelated, or
    > something
    > like that.
    >
    > Or you can google "coldfusion related selects '.
    >

Maybe you are looking for