Answers.Body: <p>Based on your description, I think the export format <em>might</em> be controlled by the "Complete Date and Time" and "Complete Date" settings at Administer > Localization > Date Formats.  The default values for those fields are:</p>
  
  <pre><code>Complete Date and Time - %B %E%f, %Y %l:%M %P
  Complete Date - %B %E%f, %Y
  </code></pre>
  
  <p>The help text on that screen reads:</p>
  
  <blockquote>
    <p>Use this screen to configure formats for date display and date input fields. Defaults are provided for standard United States formats. Settings use standard POSIX specifiers. Available specifiers and the values produced will vary based on your operating system and locale.</p>
    
    <p>Commonly Used Specifiers</p>
    
    <p>%b - abbreviated month name ('Jan'..'Dec')<br>
    %B - full month name ('January'..'December')<br>
    %d - day of the month as a decimal number, 0-padded ('01'..'31')<br>
    %e - day of the month as a decimal number, blank-padded (' 1'..'31')<br>
    %E - day of the month as a decimal number ('1'..'31')<br>
    <strong>%f - English ordinal suffix for the day of the month ('st', 'nd', 'rd', 'th')</strong><br>
    %H - hour in 24-hour format, 0-padded ('00'..'23')<br>
    %I - hour in 12-hour format, 0-padded ('01'..'12')<br>
    %k - hour in 24-hour format, blank-padded (' 0'..'23')<br>
    %l - hour in 12-hour format, blank-padded (' 1'..'12')<br>
    %m - month as a decimal number, 0-padded ('01'..'12')<br>
    %M - minute, 0-padded ('00'..'60')<br>
    %p - lowercase ante/post meridiem ('am', 'pm')<br>
    %P - uppercase ante/post meridiem ('AM', 'PM')<br>
    %Y - year as a decimal number including the century ('2015')</p>
  </blockquote>
  
  <p>If you change the values for those settings, perhaps the export format will change?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-08T23:08:41.377Z
Answers.LastActivityDate: 2016-01-08T23:08:41.377Z
Answers.UserDisplayName: Allen Hutchison
Body: <p>The error seems to occur during the export process and affects only custom date fields, not those that are built-in. </p>
  
  <p>My custom date field is set to use "mm/dd/yyyy", and stores correctly in the sql table as "yyyy-mm-dd hh:mm:ss". But then after export, the CSV in notepad shows "Month day, year" (ex: August 17<strong>th</strong>, 2015). </p>
  
  <p>The "th" in "17th" prevents Excel from recognizing it as a date when opening the CSV. That can be fixed with find/replace, but doesn't address the root problem. </p>
  
  <p>Where can I change the date export format for custom fields, or at least get rid of those ordinal suffixes?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-12T12:06:15.273Z
Comments.Text: Investigating this one. I can replicate it on the 4.6.x test site, but it's working ok on 4.7.x. Just trying to track down what changed...
Comments.UserDisplayName: Andrew West
Tags: <export><dates>
Title: Exported custom date fields formatted incorrectly
ThreadText: # Exported custom date fields formatted incorrectly
  
  (Asked by: username_0 on 2016-01-08)
  
  The error seems to occur during the export process and affects only custom date fields, not those that are built-in.
  
  My custom date field is set to use "mm/dd/yyyy", and stores correctly in the sql table as "yyyy-mm-dd hh:mm:ss". But then after export, the CSV in notepad shows "Month day, year" (ex: August 17**th**, 2015).
  
  The "th" in "17th" prevents Excel from recognizing it as a date when opening the CSV. That can be fixed with find/replace, but doesn't address the root problem.
  
  Where can I change the date export format for custom fields, or at least get rid of those ordinal suffixes?
  
  **Tags:** export, dates
  
  > **Comments:**
  > **username_1**: Investigating this one. I can replicate it on the 4.6.x test site, but it's working ok on 4.7.x. Just trying to track down what changed...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-01-08. Score: 4 | Accepted answer
  
  Based on your description, I think the export format might be controlled by the "Complete Date and Time" and "Complete Date" settings at Administer > Localization > Date Formats.  The default values for those fields are:
  Complete Date and Time - %B %E%f, %Y %l:%M %P
  Complete Date - %B %E%f, %Y
  
  The help text on that screen reads:
  
  Use this screen to configure formats for date display and date input fields. Defaults are provided for standard United States formats. Settings use standard POSIX specifiers. Available specifiers and the values produced will vary based on your operating system and locale.
  Commonly Used Specifiers
  %b - abbreviated month name ('Jan'..'Dec')
    %B - full month name ('January'..'December')
    %d - day of the month as a decimal number, 0-padded ('01'..'31')
    %e - day of the month as a decimal number, blank-padded (' 1'..'31')
    %E - day of the month as a decimal number ('1'..'31')
  %f - English ordinal suffix for the day of the month ('st', 'nd', 'rd', 'th')
    %H - hour in 24-hour format, 0-padded ('00'..'23')
    %I - hour in 12-hour format, 0-padded ('01'..'12')
    %k - hour in 24-hour format, blank-padded (' 0'..'23')
    %l - hour in 12-hour format, blank-padded (' 1'..'12')
    %m - month as a decimal number, 0-padded ('01'..'12')
    %M - minute, 0-padded ('00'..'60')
    %p - lowercase ante/post meridiem ('am', 'pm')
    %P - uppercase ante/post meridiem ('AM', 'PM')
    %Y - year as a decimal number including the century ('2015')
  
  If you change the values for those settings, perhaps the export format will change?
  
  
  ---
  
  