Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Format Date to Display Abbreviated Month Name 11 Jun 2013 15:19 #7421

In the snippet below, what do I need to set formatDate to in order to display the abbreviated month name:

I want to display something like Jan 01, 2013.

Here is the my snippet:
echo JDom::_('html.fly.datetime', array(
					'dataKey' => 'hire_date',
					'dataObject' => $this->item,
					'dateFormat' => "%Y.%m.%d"
					));

I tried "%b %m, %Y" with no luck.

Thanks for the help.

Please Log in or Create an account to join the conversation.

Re: Format Date to Display Abbreviated Month Name 11 Jun 2013 15:55 #7423

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Remove the %, they are not used.
'dateFormat' => "b m, Y"
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Format Date to Display Abbreviated Month Name 11 Jun 2013 16:13 #7425

This produces:
b 01, 2013

Please Log in or Create an account to join the conversation.

Re: Format Date to Display Abbreviated Month Name 11 Jun 2013 16:35 #7427

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I can't find the docs for that, right now.

The output is given by Joomla. It is an odd format.
You can also read your lang files to check this string for standard datetime strings.

Can somebody help ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Format Date to Display Abbreviated Month Name 11 Jun 2013 18:07 #7428

  • etc
  • etc's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 132
  • Thank you received: 19
This works for me:
"%b %m, %Y"

May 05, 2013

Please Log in or Create an account to join the conversation.

Re: Format Date to Display Abbreviated Month Name 12 Jun 2013 13:47 #7451

This is what I ended up with:

M d, Y


Thanks for help!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.090 seconds

For starters it's just so easy to design an app in a way that I'm used to i.e. database first then views followed by customization. The fork system is pure brilliance from a developer standpoint as I can override things and still add and update my projects with minimal effort! Truly amazing to be able to build components in Joomla using incremental refinement without having to do everything by hand. Thanks for the great tool! I am so much more productive now than ever and I can't imagine building components any other way!!!!
Dave (Forum)

Get Started