- Posts: 214
COMMUNITY FORUM
change date format of mysql column
- George Nasis
-
Topic Author
- Offline
- Elite Member
Less
More
10 years 1 month ago - 10 years 1 month ago #142214
by George Nasis
change date format of mysql column was created by George Nasis
hallo there!
i use a query to extract the publish_up column of the item.
i successfully do that in the query like DATE_FORMAT(publish_up, "%d %M %y") AS 'GEORGE' and then display the column.
But the output for the month is in English and no in my language. I have checked everything in translation files but with no success. Am i missing something?
In the site every other translation works fine.
thank you very much
i use a query to extract the publish_up column of the item.
i successfully do that in the query like DATE_FORMAT(publish_up, "%d %M %y") AS 'GEORGE' and then display the column.
But the output for the month is in English and no in my language. I have checked everything in translation files but with no success. Am i missing something?
In the site every other translation works fine.
thank you very much
Last edit: 10 years 1 month ago by George Nasis.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142220
by Krikor Boghossian
Replied by Krikor Boghossian on topic change date format of mysql column
Where are you trying to display this date? K2 content module, component etc?
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago #142270
by George Nasis
Replied by George Nasis on topic change date format of mysql column
hallo Krikor!
i am trying to display it in Community Builder!Everything there is also translated in my language. I read somewhere that it takes the php variables and cannot be affected. is it true?
thank you!
i am trying to display it in Community Builder!Everything there is also translated in my language. I read somewhere that it takes the php variables and cannot be affected. is it true?
thank you!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142289
by Krikor Boghossian
Replied by Krikor Boghossian on topic change date format of mysql column
This post will help you docs.joomla.org/JFactory/getDate
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
Less
More
- Posts: 214
10 years 1 month ago #142297
by George Nasis
Replied by George Nasis on topic change date format of mysql column
hallo krikor!
i read it but i cannot understand how this can help..
i am able to retrieve the date, and the date is right. The only problem is that it is not displayed in my language but in English.
thank you
i read it but i cannot understand how this can help..
i am able to retrieve the date, and the date is right. The only problem is that it is not displayed in my language but in English.
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142302
by Krikor Boghossian
Replied by Krikor Boghossian on topic change date format of mysql column
You can try passing, the date as a variable in the JDate function.
EG:
EG:
$date = new JDate('now');
echo JHtml::_('date', $date, JText::_('DATE_FORMAT_LC2'));
Please Log in or Create an account to join the conversation.