milliseconds format to parse a datetime?
问题 I need to parse a datetime contains milliseconds for matching the max value in a field containing this datetimes. For example: #standardSQL SELECT PARSE_DATETIME('%Y-%m-%d %H:%M:%S.%u','2017-08-18 16:04:40.890') Any suggestions? Thanks in advance. UPDATE : Convert to milliseconds, suddendly MAX() . #standardSQL WITH Input AS ( SELECT date FROM UNNEST([ DATETIME '2017-08-18 16:04:40.890', DATETIME '2017-07-27 11:09:10.347', DATETIME '2017-08-22 13:17:34.727', DATETIME '2017-08-22 13:17:34.737'