Date Mask in CFGRIDCOLUMN - CFMX 7

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Date Mask in CFGRIDCOLUMN - CFMX 7

    Hello, I'm using CFGRID inside of a CFFORM format='flash'. It's pretty sweet
    functionality. Just got CFMX 7 2 days ago and I'm loving it already! :>
    However, I can't get the date mask to work in my flash-formatted CFGRID
    column. When I don't have the mask attribute, the column displays the
    date/time that it pulled out of the database query just fine (date shows as
    i.e. 2004-08-21 17:20:42). However, if I put in the mask attribute (mask='MMM
    DD YYYY'), all i get in the date column is MMM DD YYYY - literally. I even
    tried the mask in the example from Macromedia LiveDocs about this (see url:
    [url]http://www.macromedia.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/h[/url]
    tml/wwhelp.htm?context=ColdFusion_Documentation&fi le=00000267.htm#3842575)
    and even that example shows me the 'mask code' instead of the date formatted by
    the mask. I've attached my code below. Any ideas what is going wrong?
    Thanks, Margaret

    <CFFORM name="buySellForm" format="flash" height="450" >
    <CFGRID name="listingsGrid" query="buySellListings" rowheaders="no">
    <CFGRIDCOLUMN name="DatePosted" header="DatePosted" mask="MMM D YYYY">
    <CFGRIDCOLUMN name="Item" header="Item" type="string_nocase">
    </CFGRID>
    </CFFORM>

    geokid Guest

  2. Similar Questions and Discussions

    1. CFGRIDCOLUMN date mask
      I am trying to display a database date field using the Coldfusion MX 7 CFGRIDCOLUMN tag. The following code displays the "CALL_DATE_TIME" date...
    2. COLDFUSION and date format in cfgridcolumn
      hello, How to make to put a date since a base mysql at the format mm/dd/yyyy in one cfgridcolumn At the moment my code is <cfgridcolumn...
    3. CFMX 7 : Mask
      Hi, I am trying to use the mask on inputting data. However, I am able to submit my form even if the mask is not completed. Example : Mask :...
    4. bug in flashForm masking date in a cfgridcolumn
      hi, I wrote some messages in this forum about the problem masking a date in a cfgridcolumn. (using a cfgrid with the data from a query). I just saw...
    5. CF7 - cfgridcolumn mask attribute acts strange
      Hi all, When I use the "mask" attribute in the cfgridcolumn tag, and fill in the value like "999". The user can still enter anything he want's...
  3. #2

    Default Re: Date Mask in CFGRIDCOLUMN - CFMX 7

    What's the data type in the database of the datePosted column?
    ---nimer


    "geokid" <webforumsuser@macromedia.com> wrote in message
    news:cvdqgi$jmh$1@forums.macromedia.com...
    > Hello, I'm using CFGRID inside of a CFFORM format='flash'. It's pretty
    > sweet
    > functionality. Just got CFMX 7 2 days ago and I'm loving it already! :>
    > However, I can't get the date mask to work in my flash-formatted CFGRID
    > column. When I don't have the mask attribute, the column displays the
    > date/time that it pulled out of the database query just fine (date shows
    > as
    > i.e. 2004-08-21 17:20:42). However, if I put in the mask attribute
    > (mask='MMM
    > DD YYYY'), all i get in the date column is MMM DD YYYY - literally. I
    > even
    > tried the mask in the example from Macromedia LiveDocs about this (see
    > url:
    > [url]http://www.macromedia.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/h[/url]
    > tml/wwhelp.htm?context=ColdFusion_Documentation&amp;fi le=00000267.htm#3842575)
    > and even that example shows me the 'mask code' instead of the date
    > formatted by
    > the mask. I've attached my code below. Any ideas what is going wrong?
    > Thanks, Margaret
    >
    > <CFFORM name="buySellForm" format="flash" height="450" >
    > <CFGRID name="listingsGrid" query="buySellListings" rowheaders="no">
    > <CFGRIDCOLUMN name="DatePosted" header="DatePosted" mask="MMM D
    > YYYY">
    > <CFGRIDCOLUMN name="Item" header="Item" type="string_nocase">
    > </CFGRID>
    > </CFFORM>
    >

    Mike Nimer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139