Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] date format

9 years 9 months ago #260737 by giorgionasis
Replied by giorgionasis on topic date format
hallo kyle,

yes it seems to work and override.

two things

1. for date format, i need for example the 30-03-2014 to be displayed as 30 mar 14
2. for time format i have set 'UE_TIME_FORMAT' => '' in order to hide time but it is not working

thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago #260762 by krileon
Replied by krileon on topic date format

1. for date format, i need for example the 30-03-2014 to be displayed as 30 mar 14

See PHP date function documentation for formatting.

php.net/manual/en/function.date.php

2. for time format i have set 'UE_TIME_FORMAT' => '' in order to hide time but it is not working

Correct, the check is != '' which means null and '' will fallback to configuration default. Specify a time format of space (e.g. ' ') to hide all time displays (not really advised, but up to you).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

9 years 9 months ago #260794 by giorgionasis
Replied by giorgionasis on topic date format
hi kyle,

thank you very much, it is working as i wanted. one last question.
i have chosen d M y
so i have 17 Mar 14. where i can change the Mar?in the language file i try to change the "Mar" but it is not affected.

and also for the 3rd party plugin the procedure worked and stangely it didn`to work for a cb query field i use..

thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago - 9 years 9 months ago #260829 by krileon
Replied by krileon on topic date format
The "Mar" is output by PHP date class. I've no idea if it can be translated as it's based entirely on the language PHP is using. I will be looking into this for a future CB release for our cb date format function to see if we can add localization to it. For now I've no idea as I haven't looked into it.

and also for the 3rd party plugin the procedure worked and stangely it didn`to work for a cb query field i use..

My guess is you're outputing a date from your database. CB Query Field just displays the results of your query. It does no special formatting. To format the date in your query you need to use SQL functions for that. Please see the below.

dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 9 months ago by krileon.

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

9 years 9 months ago #260930 by giorgionasis
Replied by giorgionasis on topic date format
ok kyle,

as concern the second part i use this query
Code:
SELECT title,id,publish_up FROM #__k2_items WHERE published=1 AND trash=0 AND created_by=[id] ORDER BY publish_up DESC;

and for display this custom
Code:
<span style="font-weight:normal;">[column_title]</span>&nbsp&nbsp&nbsp&nbsp<span>[column_publish_up]</span>

where exactly to apply the DATE_FORMAT() function??

thank you

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

9 years 9 months ago #260931 by giorgionasis
Replied by giorgionasis on topic date format
hallo again!

ok i figured out how to solve with the DATE_FORMAT.

i was thinking for the first question maybe the output of the php is related to languages files of Joomla?

thank you

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

Moderators: beatnantkrileon
Powered by Kunena Forum