title: Store Date in DD/MM/YYYY in Excel & Compute Date Difference
body: <p>I have a Excel Sheet with below columns .</p>
  
  <pre><code> A            B                   C                 D
   Worker       Work Start Date     Work End Date     Working Period(B-C)
   1            1/1/2014            1/10/2014         0 Years 0 Months 10 Days
   2            1/1/2014            2/28/2014         0 Years 2 Months 00 Days
  </code></pre>
  
  <p>I have Userform that will accept these values from the textbox and store in Excel sheet.</p>
  
  <p>Problem is When is input Dates[in dd/mm/yyyy format] as 15/07/2014 it accepts and save it as 15/07/2014 in DD/MM/YYYY format in Excel Sheet .</p>
  
  <p>If i give 15/17/2014 it throws error Date should be in DD/MM/YYYY</p>
  
  <p>Same thing If i give Date as 07/15/2014 it accepts the date and in Excel column it saves as 7/15/2014 while it displays 15/07/2014 since i have set format as DD/MM/YYYY </p>
  
  <p>I used below validation .</p>
  
  <pre><code>If Me.txtStartDate.Value = "" Then
      MsgBox "Please enter Work Start Date."
      Me.txtStartDate.SetFocus
      Exit Sub
  End If
  
  If Not IsDate(Me.txtStartDate.Value) Then
      MsgBox "The Work Start Date Field must be in DD/MM/YYYY format"
      Me.txtStartDate.SetFocus
      Exit Sub
  End If
  </code></pre>
  
  <p>Ideally this is what i am expecting.
  Only valid date should be entered via Form. I use textbox to input date in DD/MM/YYYY Format. There are chances that user may enter 01/12/2014 or 1/12/2014 in dates. I mean leading zeros may be entered or not for DD &amp; MM.</p>
  
  <p>Please advice how i can handle this.
  How excel treats dates to store actually in which format .</p>
  
  <p>How to calculate Period column in Years Months Days Format.</p>
  
  <p>Thanks for the help .</p>