Thank you both for your answers.
Quote:
Originally Posted by Sabardeyn
|
The column containing the original data is already organized into subgroups.
Quote:
Originally Posted by chaley
The following general program mode template does what I think you want.
Code:
program:
date = field('#original_date');
# compute the components
year = subitems(date, 0, 1);
month = re(subitems(date, 1, 2), '^\D*$', '00');
day = ifempty(subitems(date, 2, 3), '00');
# compute the return value
strcat(year, '--', month, '--', day)
|
That's exactly what I was looking for.
One last question:
I expanded the template to ISO 8601 format. Is there a way to convert this date string to datetime data type?
That would allow me to
a) sort the column by date instead of string,
b) use date formatting in further columns (e.g. used for display in the content server).
Or is that impossible because 1955-00-00T00:00:00Z+00:00 is not a valid date (with a 00 month and day)?