Appnitro Software Forums » MachForm

Entries do not show year anymore?

(3 posts)

  1. MvdL79
    Member

    Hi Yuniar,

    I hope everything is well.

    I have a small problem, which hopefully can be fixed without to much work. In 2008 the entries of our forms were stored like this: 2008-12-08

    However, I only noticed it today, since I had to look up something, that it now shows entries like this: Jan 16

    How come? And can this be fixed, so it shows the entries like previously? E.g. 2009-01-16

    Also, since we are at it, is it possible to change the date completely? I want it to show 16-01-2009 (day-month-year) and I also do not want the entries to show stuff like this: 1 day ago, 2 weeks ago, etc. I just want the dates.

    Is this possible without messing current entries up? Cause we have over 400 entries already and we need them stored.

    Let me know!

    Regards,
    Michel

    Posted 2 years ago #
  2. Hi,

    Can you tell me, is there any customization have you made related to that format before ? Because by default machform have "m/d/Y" format for date element.
    Anyway you can change the view format by modify "entry-functions.php" file, go to around line 336 and you will see this code :

    $date_value = date("m/d/Y",strtotime($date_value));

    you can replace with this one

    $date_value = date("Y-m-d",strtotime($date_value));

    and to change date created format, you should edit "manage_entries.php", go to around line 346, you will see this code

    $form_data[$i][$j] = short_relative_date($form_data[$i][$j]);

    change it to

    $form_data[$i][$j] = date('Y-m-d',strtotime($form_data[$i][$j]));
    Posted 2 years ago #
  3. MvdL79
    Member

    Well I don't remember if I made changes to the forms anymore. It has been awhile.
    Anyways did the changes you mentioned and they work fine now!

    Thanks!

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.