Date in the Datagrid

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Date in the Datagrid

    Hi everyone

    I recieve from a Java back end application a list of objects to populate my
    Datagrid. One field of these objects is "creation time" - a long value that
    holds the time when the object was created. How do I convert this long to a
    Date in my Datafield?

    thanks in advance

    leoalvesmachado Guest

  2. Similar Questions and Discussions

    1. Sort by Date in Datagrid
      I can`t Sort by Date in Datagrid, it didn`t read the values as date, it is listed like text. Someonte knows a script to make it correctly? Thank`s.
    2. Date formating in DataGrid
      I have a datagrid ( bound to a resultSet via Java remoteobject service ). One of the fields is a datetime field (DOB). I wish to format the date...
    3. DataGrid with date column that is sometimes blank
      A column in my data source is of type DateTime and "no date" is represented as DateTime(0). How can I get the DataGrid to display the column as...
    4. datagrid sort by date
      Hi! I have a datagrid which is populated from an Access database. I have a column in the database and in the datagrid where the values are of the...
    5. >>Here's a Datagrid sort by date AS<<
      Use the following actionscript to sort a datagrid by date. I needed an AS like this, but because I couldn't find any others I had to write it...
  3. #2

    Default Re: Date in the Datagrid

    You could try, new Date(Date.parse(<your java value here>))

    I am in a similar situation but I wasn't sure how to get it done. So I just
    ended up doing a .ToString on the date/time object before giving to it to Flex.

    anoweb Guest

  4. #3

    Default Re: Date in the Datagrid

    You need to specify a label function for your column. With the label function you may format your data in any way you wish without actually changing the data.
    javamonjoe Guest

  5. #4

    Default Re: Date in the Datagrid

    If it is a long, then it must be something likd "ticks" or milliseconds since
    som data. I do not know java well enough, or when it starts its dates, but it
    may not be the same a AS.

    So I thinkAnoweb's idea, convert the long into some recognizable date string
    on the server is a good idea. i am standardizing on the ISO date string format:
    YYYY-MM-DDThh:mm:ss-[timezoneoffset]

    Note that the AS data.parse cannot read that directly drat it, so I have a
    library ov conversion funtions to work with that format.

    Tracy

    ntsiii 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