trimming the date Forums › Forums › General Discussions › Open Topic › trimming the date This topic has 2 replies, 2 voices, and was last updated 21 years, 7 months ago by Anthony. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts July 11, 2004 at 9:01 am #47155 AnthonyParticipant i have a DATE column in a db. YYYY-MM-DD 2002-02-24 i’d like to trim off the month and date, only returning YYYY. and i’m using php/mysql July 11, 2004 at 1:39 pm #103573 Bucky RamoneParticipant Maybe you can use mySQL’s DATE_FORMAT() (using the %Y format) July 11, 2004 at 3:10 pm #103574 AnthonyParticipant i was trying to do it a la php, but this works fine. just adds another column to the results returned: SELECT mp3_album.album_year, YEAR(mp3_album.album_year) AS album_year_2, Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In