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.089 seconds

Hi guys Before I ask for help just like to say I tried the tutorials on how to make a 2.5 component WOW.... HECTIC!! J-Cook is really amazing in its simplicity!!
Dorac (Forum)  

Get Started