title: How to save the Date as DD/MM/YYYY format in SQLITE Flex AIR application
body: <p>i am doing a flex Adobe AIR Application with SQLITE Data base,in that i want to save Date in the following format DD/MM/YYYY, but in my SQLITE TABLE i gave the data type is DATE so it saved as  <strong>Sun Dec 2 00:00:00 GMT+0530 2012</strong> in this format.</p>
  
  <p>why i want to save in specific format.i have two date fields START DATE and END DATE.Once i select the End DATE date field i have to count the days between them automatically.any ideas for DD/MM/YYYY format and counting the date in between the dates.</p>
  
  <p>This is my code:</p>
  
  <pre><code>        [Bindable] private var date1:Date;
  
          [Bindable] private var date2:Date;
  
          [Bindable] private var Totaldays:String;
  </code></pre>
  
  <p>protected function modEndDate_creationCompleteHandler(event:FlexEvent):void</p>
  
  <pre><code>        {   
  
  
  
              formatter.formatString= "DD-MM-YYYY";
  
  
  
              date1=formatter.format(newStartdate.selectedDate);
  
              date2=formatter.format(newEndDate.selectedDate);
  
              **Totaldays=Math.floor(Math.abs(date1 - date2)/ (24 * 60 * 60 * 1000))**
  
  
  
          }
  </code></pre>
  
  <p>The error is:</p>
  
  <p>Multiple markers at this line:</p>
  
  <p>-1067: Implicit coercion of a value of type Date to an unrelated type Number.</p>
  
  <p>-1067: Implicit coercion of a value of type Number to an unrelated type String.</p>
  
  <p>Looking for help.Thanks in Advance</p>
  
  <p>Regards,</p>
  
  <p>Venkatesan</p>