I needed to select records for this month so far from the database, which required getting the first day of the...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
current month. After a while, I worked out the following code. To get the prior 12 months, add "- 12 months" after the "+ 1 day" part. select * from file where indate >= date(curdate() - day(curdate()) days + 1 day)
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.