JJmonterey's picture

A content type has a date field named "1st Call Date Time" that has a date format selected as "ymd" with no separators.

Using Automatic Entity Label or Automatic Nodetitles a Title pattern is selected using tokens.

The title when viewed does not use the date format selected for the date field used but instead uses a date format much more verbose. Does anyone know a fix for this?

The desired Title pattern is:     251126-FedEx 1368

Accepted answer

You have to use an extended selector...
[node:field_1st_call_date_time:custom:ymd]

Experiment the ymd format

https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters

 

Comments

When you use "simple" field tokens for any field, their display is determined by your choice in the Manage Display UI for the content type. Look for the display mode called "Tokens" and customize the token output for the date field there.

Another way is to use "complex" tokens that include additional information about the format. In the case of dates, you can use:

[node:field_1st_call_date_time:custom:ymd] 

Where custom is telling Backdrop that you are using a custom date format, and ymd is the shorthand provided by PHP for formatting the date.  

Oh, one more thing. If your date field has a start and an end, then the token is slightly different. [node:field_1st_call_date_time:date:custom:ymd] for the start date, or [node:field_1st_call_date_time:end-date:custom:ymd]