This content has been marked as final. Show 4 replies
transaction.date = new Date(transactionFromAC.date);
Are you getting a response from that? I thought in order to read attributes from XML in Flex you needed to do transactionFromAC.@date?
Yes, I am. When I change the datattype of "date" to String and simply set it like this:
transaction.date = transactionFromAC.date;
it works. I could use Strings, but I want to be able to sort and filter the ArrayCollection by date.
I don't have a specific answer for you. But for what it's worth, I've found date and especially date/time parsing support in AS to be practically useless. This really surprised me how primitive and non-functional it is 'out-of-the-box'. I spent a lot a time on it convinced that surely I'm missing something. In the end, I just wrote my own quick parser in AS. It's not extremely robust and it's hardcoded for one specific date/time format, but it's a simple band-aid that works for the time being.
Mine is for a format like MM/DD/YY HHMM. Should be easily adaptable to your format . Let me know if you want the code.
Yeah, me too. I just rolled my own. I'll post my date utility class here, no warranties, etc. I parse a date very similar to yours.