webform 6.x-2.9 there is an issue with the date format in the table view of form submissions. I have seen some other bugs reported (in the issues) admin for the csv output and some others but as I didn't see a resolution to this issue, I have submitted a new issue.

Other issues that this is related to http://drupal.org/node/426542

The problem was that the _webform_table_data_date function in date.inc was always outputting date MM/DD/YYYY , (31 jan as 01/31/2009) and not adhering to the drupal config setup. The fix is easy in date.inc

--- a/sites/all/modules/webform/components/date.inc
+++ b/sites/all/modules/webform/components/date.inc
@@ -401,7 +401,9 @@ function _webform_analysis_rows_date($component, $sids = array()) {
  */
 function _webform_table_data_date($data) {
   if (drupal_strlen($data['value']['0']) > 0 && drupal_strlen($data['value']['1']) > 0 && drupal_strlen($data['value']['2']) > 0) {
-    return check_plain($data['value']['0'] .'/'. $data['value']['1'] .'/'. $data['value']['2']);
+    $timestamp = strtotime($data['value']['0'] ."/". $data['value']['1'] ."/". $data['value']['2']);
+    $format = webform_date_format('short');
+    return date($format, $timestamp);
   }
   else {
     return '';

I suggest that this code is incorporated into the module.

CommentFileSizeAuthor
#2 webform_date_display.patch762 bytesquicksketch

Comments

AndrewBoag’s picture

Is there anything more needed to bring this to the attention of module maintainer

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new762 bytes

I've committed this patch to the 3.x version and similar patch to 2.x. Note that the strtotime() function may be inaccurate in some situations, but it's what we're doing everywhere else in 2.x so it's not going to do any additional harm.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.