--- In [email protected], "candysmate" <[EMAIL PROTECTED]> wrote:
>
> I'm returning a date from a MS SQL database.
> The date held in the database (datetime field) is: 26/03/2007 00:00:00
> 
> However my function (below) returns: 1174867200000
> 
> private function dateTest():void
> {
>  connectServer();
>  var headerRetrieveResult:ArrayCollection = new
> ArrayCollection(mySQLServer.executeQuery("SELECT  week_starting,
> CONVERT(char(10), week_starting, 103) AS formatteddatefield FROM
> flexing_advice_header WHERE  (supplier_account = '1234') AND
> (advice_no = '188557')"));
>                               
>  var headerObject:Object = headerRetrieveResult.getItemAt(0);
>       
>  dateField.text = headerObject.week_starting;
>  disconnectServer();
> }
> 
> I've tried a select query with the formatteddatefield  stuff, but get
> the same result.  I was hoping it would return the date as a string
> link  '26/03/2007 00:00:00'.
> 
> Any ideas guys?
>

Just realised I actually needed: 

dateField.text = headerObject.formatteddatefield;

Reply via email to