Menu

HoWTO European "DATE" format to mm-dd-yyyy ?

Help
2002-05-06
2002-06-04
  • impu choudhury

    impu choudhury - 2002-05-06

    Hi,
       I notice that metadot put the following time stamp for all the date format (including in table, it will sort based on european date format, not the other.  For example, i added a news item and it entered the following date 2002-05-06

    I couldn't find the format anywhere... can you please help me resolve this problem?

    Thanks

     
    • Nicholas Moline

      Nicholas Moline - 2002-05-07

      yyyy-mm-dd is the default MySQL dateformat.  To change it you simply find where it pulls the date in the initialization scripts of the gizmos and simply replace the fieldname with:

      DATE_FORMAT(fieldname,"%m-%d-%Y")

       
    • impu choudhury

      impu choudhury - 2002-06-04

      I looked in Table.pm gizmo, but did not find where I would change it.  I found in Category.pm and changed to

      date_format(showfrom, '%Y%m%d')

      from
      date_format(showfrom, '%m%d%Y')

      but Table created in Metadot still showing yy-mm-dd but in the discussion the format is what I want.

      Also did that in Gizmo.pm

      From  date_format(showfrom,'%Y-%m-%d'),

      To

         date_format(showfrom,'%m-%d-%Y'),

      but still Table sorting as YY-mm-dd. 

       

Log in to post a comment.