When viewing webform reports with a date column, we'll see that this format isn't cutomizable form the UI. If we look the related code, we can see that reports use a 'small' date format that isn't a built-in date format in core:

format_date($submission->submitted, 'small')

We've to use a buil-in format like 'short' instead of 'small', that is no configurable unless we create a new date format with 'small' machine name.

#1 small-date-format-1480788-1.patch1.51 KBrvilar
Members fund testing for the Drupal project. Drupal Association Learn more


rvilar’s picture

Status: Active » Needs review
1.51 KB

I attach a patch that replace 'small' date format with 'short' built-in.

quicksketch’s picture

Thanks, I thought at some point Drupal used "small" (which I agree is a dumb name), but I must have missed when that changed. Thanks for the patch, I'll take a look when I get a chance.

quicksketch’s picture

Status: Needs review » Fixed

The related Drupal 7 change: #368408: Consistent date length nomenclature in format_date().

Even though in D6, the formats are called short, medium, and long in the UI, the format_date() function still takes small, medium, and large as the second parameter. Committed this patch to D7 only. Thanks for the patch!

Status: Fixed » Closed (fixed)

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