Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Date Format

forums forums SQLyog Using SQLyog Date Format

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #23423
      peterlaursen
      Participant

      You cannot do this in SQLyog.  Dates in MySQL is stored in the format of YYYY-MM-DD, and a client like SQLyog cannot change this.

      With web applications I think it is most common to use different (PHP/javascript) (string) functions to extract year, month and day and builld you own display format.

      However in SQL what you can is described here:

      http://dev.mysql.com/doc/refman/5.0/en/dat…-functions.html

      note the DATA_FORMAT() function and the lot for formatting string options available!

      An example:

      Code:
      set @the_current_date = '2007-02-16';
      select date_format(@the_current_date,'%e-%m-%Y');
      — this returns '16-02-2007'

      There is no GUI functionality for this – you will need to write the SQL yourself.

      Also note that the above example (with user variables) will not work with HTTP tunnelling unless you use SQLyog 5.23 with php_mysqli() ).

Viewing 0 reply threads
  • You must be logged in to reply to this topic.