FreakScene.net

Dinosaur Jr. Fan Community

Menu

Skip to content
  • Home
    • News
  • Artists
  • Song Lyrics
  • Links
  • Contact Us
    • Privacy Policy
  • Forums
    • Latest Topics
    • Dinosaur/J News & Discussions
    • Dinosaur Related Discussions
    • General Discussions
    • Bootleg Trading
    • Guitar Room
    • Fossils
    • Get Discovered
    • Introductions
    • Site Suggestions + Comments
    • Live reviews / meetups
    • Open Topic
    • Area 51
    • Musicians & D.I.Y. Artists

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
    Anthony
    Participant

      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 Ramone
      Participant

        Maybe you can use mySQL’s DATE_FORMAT() (using the %Y format) :roll:

        July 11, 2004 at 3:10 pm #103574
        Anthony
        Participant

          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
        Proudly powered by WordPress | Theme: Illustratr by WordPress.com.