Get the App
SLTechnology News&Howtos  ›  Database  › 

The method of converting mysql string to date date

Shulou Source: shulou.com Published: 2022-06-01 04:13:42 09月30日 Update

This article mainly introduces the method of converting mysql string to date date, which is very detailed and has certain reference value. Friends who are interested must finish reading it!

The method of converting mysql string to date date: first, log in to mysql in cmd, and enter the relevant code to get the [yyyy-MM-dd] format; then abbreviate the middle-aged part of the date string, and concatenate the date string with dots; finally, enter the statement to get the time, minutes and seconds.

The method of converting mysql string to date date:

1. Log in to mysql at cmd, as shown in the following figure

2. You can get the yyyy-MM-dd format by typing select str_to_date ('08Compact 09Universe 2020mm,'% mUnip% d _ hand% Y'), as shown in the following figure

3. The middle-aged part of the date string can also be abbreviated, as shown in the following figure

4. in addition, date strings can also be concatenated with dots, as shown in the following figure

5. Then enter select str_to_date ('01 07 30 seconds,'% hrace% ivy% s') to get time, minutes and seconds, as shown in the following figure

6. finally, you can also convert the string of the year, month, day, minute and second, as shown in the following figure

The above is all the contents of the method of converting mysql string to date date. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Character string date method input content minute and second due time format abbreviation part login code value interest boy partner year month day time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn Huawei Shulou Tech Info Shulou Technology