3

I have created content type and installed Automatic Entity Label and generated the auto label using field tokens of:

  1. field_id

  2. field_DOB

  3. field_Gender

After saving the content DOB format is displaying with time stamp 56u 2015-10-13 00:00:00 Male but here I want to show only something like this 56u 2015-10-13 Male.

I want to remove this 00:00:00.

While creating the field DOB I have chosen the following settings but still getting the hour, minutes, and seconds. How to remove this? Any suggestion?

enter image description here

6

Steps to achieve your requirement:

  1. Goto /admin/config/regional/date-time/formats/add link, and add Format string as explained in the PHP manual.

    enter image description here

  2. Now add Date type and select the format you created.

    enter image description here

  3. Finally, go to content type Manage Display settings and add your newly created date format.

  4. At URL /admin/structure/types/manage/page/auto_label, add token of the DOB field with the format you created by Browsing Available Tokens.

    enter image description here

  • I followed the same but no luck – kashish Oct 14 '15 at 10:36
  • Let me know where u stuck. – Nikhil Banait Oct 14 '15 at 10:38
  • actually i am generating auto label tittle where in i am giving token something like this [node:field_dob1] [node:field_gender] Note: for the field_dob1 content saved its displaying the format which we have chosen, but in the content auto label tittle where in i am using the field_dob1 token, its not displaying the format whatever i chosen – kashish Oct 14 '15 at 10:46
  • 2
    @kashish Click "Browse Available Tokens", you'll find one in there that uses the new date format you've just set up – Clive Oct 14 '15 at 11:12
  • 1
    @kashish increase the memory limit in PHP.ini file – Nikhil Banait Oct 14 '15 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.