Jump to content

Select a year from datetime


marf

Recommended Posts

This should be fairly simple I think. I want to perform basically this

 

SELECT * FROM database WHERE date='2006-00-00 00:00:00'

 

Will this work? I want to select all the entries where the year is 2006. I'm not sure if this will specifically look for 2006-00-00 00:00:00.. logically to me I would want date='2006-XX-XX XX:XX:XX'  but SQL doesn't like that of course.

 

 

Link to comment
https://forums.phpfreaks.com/topic/56234-select-a-year-from-datetime/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.