mybatis operation of common functions mysql

Conversion between 1 datetime and String

When using the extracted date data
date_format (CREATE_DATE, '% Y-% m-% d% H:% i:% s') as CREATE_TIME

When inserting data
to_date (# {CREATE_DATE}, ' % Y-% m-% d% H:% i:% s')

 

2 taken String Functions

left (string, len) length, taken from the left bit

right (string, len) length, taken from the right place

substring (string, startlen) taken from the start to the end position startlen

substring (string, startlen, len) taken from the start len ​​bit position startlen



 

Guess you like

Origin www.cnblogs.com/0515web/p/11202742.html