MYSQL tips and tips
Use str_to_date () in mysql to convert a string to a date.
Take the BJSJ of T_TGS_ALARMED as an example to query the data within this range.
Insert into T_TGS_ALARMED (XH, HPZL, HPHM, BJSJ, BJLX, BJYY, KKID, DDBH, FXBH, CDBH, CLBJ, CJJG, CLRQ, CLRY, CLYJ, GXSJ, BZ)
Values ('20140901', '01', 'lu N89728 ', STR_TO_DATE ('29-03-1603291112277032122172442 16:28:44', '% d-% m-% Y % H: % I: % s '), '8', 'Yellow cars are not allowed to drive on this road section! ', '123', '1234568', '02', 1, '0', '1234568', null, null, STR_TO_DATE ('29-03-2016 16:28:44 ',' % d-% m-% Y % H: % I: % s'), null );
Note: '% Y-% m-% d % H: % I: % s' format: 16:52:30
Note: % W name of the Week (Sunday ...... Saturday) % D Date of the month with an English prefix (1st, 2nd, 3rd, and so on .) % Y year, number, 4 digits % y year, number, 2 digits % a abbreviation of the week name (Sun ...... Sat) % d number of days in the month (00 ...... 31) % e number of days in the month (0 ...... 31) % m month, number (01 ...... 12) % c month, number (1 ...... 12) % B abbreviated month name (Jan ...... Dec) % j days in a year (001 ...... 366) % H hour (00 ...... 23) % k hour (0 ...... 23) % h hour (01 ...... 12) % I hour (01 ...... 12) % l hour (1 ...... 12) % I minute, number (00 ...... 59) % r time, 12 hours (hh: mm: ss [AP] M) % T time, 24 hours (hh: mm: ss) % S seconds (00 ...... 59) % s seconds (00 ...... 59) % p AM or PM % w days in a week (0 = Sunday ...... 6 = Saturday) % U Week (0 ...... 52), here Sunday is the first day of the week % u Week (0 ...... 52), Monday is the first day of the week % A text "% ".