Date Formatting with Flex

Categories

Tags

I’ve been working with some Adobe Flex recently, and was having some trouble formatting dates. For those who don’t know, here (in th UK) we use the format “dd/mm/yyyy” (Day/Month/Year) as opposed to people over in the States using “mm/dd/yyyy” (Month/Day/Year).

I had to use the DateField component, and couldn’t find a way in heaven to get the date it returns formatted as “dd/mm/yyyy”.

I consider myself a flex beginner, and haven’t really done much with it (I know, shame on me), and usually have research for online resources (A.K.A “Google Desperation”).

Surprisingly, it’s not very easy to find good online resources for Flex, and when searching for it, I was mostly presented with dodgy date strings being split up and used as arrays.