Welcome, Guest
Username: Password: Remember me

TOPIC: Format Date to Display Abbreviated Month Name

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

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
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.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Remove the %, they are not used.
'dateFormat' => "b m, Y"
Coding is now a piece of cake
The administrator has disabled public write access.

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

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
This produces:
b 01, 2013
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
The administrator has disabled public write access.

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

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

May 05, 2013
The administrator has disabled public write access.

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

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
This is what I ended up with:

M d, Y


Thanks for help!
The administrator has disabled public write access.
Time to create page: 0.118 seconds

Get Started