Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Update date to 1st day of the month in MySQL?

You can convert it to string to get the year and month and concatenate it with 01.

UPDATE  tableName
SET     dateField = CONCAT(DATE_FORMAT(dateField, '%Y-%m-'), '01')
  • SQLFiddle Demo

Tags:

Mysql

Sql

Sql Update

Date

Related

How to get to print in DymoLabel printer using javascript? java.io.IOException: Broken pipe Is there any implementation to Remove by Key and get the Value at the same time? How can you print a key given a value in a dictionary for Python? How to get Yahoo's woeid by location? getDateTime from ResultSet java How to read utf16 text file to string in golang? python import error "No module named appengine.ext" Which characters need to be escaped when using Bash? Run a jar file using windows scheduler Should I use C++11 emplace_back with pointers containers? Combine consecutive date ranges

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy