OS Property support center

change date format

  • Mark
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #75541 by Mark
change date format was created by Mark
Original date format is
2016-02-02 12:02:19
yyyy-mm-dd h:i:s

I assume the same format is if you import any date in csv import.

i need to change that to format
02/02/2016 12:02:19
dd/mm/yyyy h:i:s

so question is where is that to change? I keep on searching and post the solution if i find it first. But it would be nice if you could tell me. I checked the configuration it offer change of format but not the required format.

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

More
9 years 3 months ago #75543 by Mr. Dam
Replied by Mr. Dam on topic change date format
Hi,
Please open file:
root > administrator > components > com_osproperty > classes > configuration > general > layout_of_site.php by notepad and find
Code:
$option_format_date[] = JHtml::_('select.option','d-m-Y H:i:s','d-m-Y H:i:s'); $option_format_date[] = JHtml::_('select.option','m-d-Y H:i:s','m-d-Y H:i:s'); $option_format_date[] = JHtml::_('select.option','Y-m-d H:i:s','Y-m-d H:i:s');

and change to

$option_format_date[] = JHtml::_('select.option','d-m-Y H:i:s','d-m-Y H:i:s');
$option_format_date[] = JHtml::_('select.option','m-d-Y H:i:s','m-d-Y H:i:s');
$option_format_date[] = JHtml::_('select.option','Y-m-d H:i:s','Y-m-d H:i:s');
$option_format_date[] = JHtml::_('select.option','d/m/Y H:i:s','Y-m-d H:i:s');


Good luck
Dam

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

  • Mark
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #75546 by Mark
Replied by Mark on topic change date format
i did that change. but it do not work.
My CSV import has a extra field with import of creating date. After importing it show the date as -1-11-30.
If i add date in backend he still writes the date as 2016-02-02.
I changed the settings in configuration. any idea why?

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

More
9 years 3 months ago #75547 by Mr. Dam
Replied by Mr. Dam on topic change date format
Ah, in case you use CSV import, the date format should be: YYYY-mm-dd H:i:s, the configure option i mentioned above is for showing only. Hope you understand.
Thanks
Dam

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

  • Mark
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #75548 by Mark
Replied by Mark on topic change date format
I have to import daily over 100 csv files and all dates coming in the dd/mm/yyyy H:i:s format.
Is their no way to change the format?

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

More
9 years 3 months ago #75581 by Mr. Dam
Replied by Mr. Dam on topic change date format
Hi Mark,
Unfortunately, we don't have solution to solve this problem.
Thanks
Dam

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

  • Mark
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #75628 by Mark
Replied by Mark on topic change date format
then i need to turn it around.
by import with csv he uses the date of processing as creating date. That make every property imported today as "just added" property. but i have in my csv file 3 different dates inside. one is the creating date then the available date and the date of last update.
The import is done daily.
Property A import today gets date of today.
Tomorrow i import again the property and it get the date from tomorrow. What i need that he take the creating date from the csv file. I think that should be possible.

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

Moderators: Mr. DamNguyen Phu Quan