Tag:datetime

  • MySQL time type and mode

    Time:2019-12-7

    When I was inMySQLAn error is reported when trying to insert a data with a time stamp in the database: mysql> insert into alarm_service values (6, ‘1970-01-01 08:00:00’); ERROR 1292 (22007): Incorrect datetime value: ‘1970-01-01 08:00:00’ for column ‘time’ at row 1 #View table structure mysql> show create table alarm_service; +—————+————————————————————————————————————————————————————————————————————————————–+ | Table | Create […]

  • Function code to convert datetime type in WMI to VBS time

    Time:2019-12-7

    There are two ways to convert. One is to write a function analysis by yourself: Copy codeThe code is as follows: Function WMIDateStringToDate(DateTime) WMIDateStringToDate = _ CDate(Mid(DateTime, 5, 2) &_ “/” &_ Mid(DateTime, 7, 2) &_ “/” &_ Left(DateTime, 4) &_ ” ” &_ Mid (DateTime, 9, 2) &_ “:” &_ Mid(DateTime, 11, 2) &_ […]

  • Summary of Python — time datetime

    Time:2019-11-11

    [TOC] Summary of Python — time datetime time basic import time time.time() Out [3]: 1561107970.0175698 time stamp time.localtime() Out [4]: time. Struct time (TM year = 2019, TM mon = 6, TM mday = 21, TM hour = 17, TM min = 6, TM sec = 20, TM WDAY = 4, TM yday = 172, […]