标签: php sql datetime timestamp
我需要创建一个PHP函数来检查字符串是否是SQL时间戳yyyy-mm-dd hh:mm:ss [.fff]。有没有人这样做过?建议?
答案 0 :(得分:2)
$match_pattern = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}:\d{2}-\d{2}:\d{2})/";