Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to change the date type of mysql query to yyyy-MM-dd
How to change the date type of mysql query to yyyy-MM-dd
1. Open the excel file on the computer, and click to select the cell to modify. Then right-click the table to open the menu, find the option to format the cells, and click Enter. In the pop-up interface, click Customize on the right, then enter "yyyy-mm" code in the type, and click OK.

2. First, you use date to connect data. Second, you use the format method of the simpledateformat method. Supplement: The parsing method is to change the date of YY-M-D string type, such as 20 18- 1- 12, to date type. The method of receiving database data and the formatting method are wrong.

3. Find out the data and then process it into YY-MM-DD, and then return to the foreground page. After finding the data, format the time with simpleDateFormat. MySQL is a relational database, developed by MySQLAB Company in Sweden, and currently belongs to Oracle.

4. Using the getdate function, you can take out the year part of the date and time type value, and the result is an integer value. This should meet your requirements.

5. Date data type: used to store dates without time. Mysql obtains and displays this type in the format of "YYYY-MM-DD". The supported time range is "1000-00-00" to "nine thousand nine hundred and ninety-nine-12-31". Date and time type: stores data with date and time.