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

Just wanted to congratulate you on the J-Cook website / web development tool. In a couple of visits I've had a play around with Cook and have to say I think it is fantastic.  I've played with a number of component builders in the past and yours is certainly looking like the best so far. I'd also like to help you spread the word - I'm really surprised more people aren't excited about this tool. Good luck with the project.
Dean

Get Started