github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/parse_date.en.md (about) 1 ### `parse_date()` {#fn-parse-date} 2 3 Function prototype: `fn parse_date(key: str, yy: str, MM: str, dd: str, hh: str, mm: str, ss: str, ms: str, zone: str)` 4 5 Function description: Convert the value of each part of the incoming date field into a timestamp 6 7 Function parameters: 8 9 - `key`: newly inserted field 10 - `yy` : Year numeric string, supports four or two digit strings, if it is an empty string, the current year will be used when processing 11 - `MM`: month string, supports numbers, English, English abbreviation 12 - `dd`: day string 13 - `hh`: hour string 14 - `mm`: minute string 15 - `ss`: seconds string 16 - `ms`: milliseconds string 17 - `us`: microseconds string 18 - `ns`: string of nanoseconds 19 - `zone`: time zone string, in the form of "+8" or \"Asia/Shanghai\" 20 21 Example: 22 23 ```python 24 parse_date(aa, "2021", "May", "12", "10", "10", "34", zone="Asia/Shanghai") # Result aa=1620785434000000000 25 26 parse_date(aa, "2021", "12", "12", "10", "10", "34", zone="Asia/Shanghai") # result aa=1639275034000000000 27 28 parse_date(aa, "2021", "12", "12", "10", "10", "34", "100", zone="Asia/Shanghai") # Result aa=1639275034000000100 29 30 parse_date(aa, "20", "February", "12", "10", "10", "34", zone="+8") result aa=1581473434000000000 31 ```