1

I have a column in my database which the datetype is TimeStamp, but I want the only date part of this column not date and time, for example if the time stamp is (2016-02-06 21:01:27) so I only want the (2016-02-06), So I need your help

MAO
  • 81
  • 9
  • 1
    Possible duplicate of [Convert timestamp to date in MySQL query](http://stackoverflow.com/questions/9251561/convert-timestamp-to-date-in-mysql-query) – Giorgos Betsos Feb 06 '16 at 22:01

1 Answers1

1

you can use date() function

mysql> SELECT DATE('2003-12-31 01:02:03');
        -> '2003-12-31'
Nir Levy
  • 12,750
  • 3
  • 21
  • 38