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

This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.
Kevin (JED)

         

Get Started