Skip to main content

Convert text to date format by formula

1. Usage scenarios

In this example, let's learn how to convert text to date format through YIDA formula.

2. Implement functions

2.1 Configuration Table page

2.2 configuration field Formula

Modify the fields as needed.

(1) date and time (year, month and day)

{"text":"TIMESTAMP(DATE(MID(​文本时间​,1,4),MID(​文本时间​,5,2),MID(​文本时间​,7,2)))","marks":[{"from":{"line":0,"ch":19,"sticky":null},"to":{"line":0,"ch":25,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":35,"sticky":null},"to":{"line":0,"ch":41,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":51,"sticky":null},"to":{"line":0,"ch":57,"sticky":null},"value":"textField_ksh9bz3r","invalid":false}],"isCmData":true}

(2) date and time (year, month, day, minute and second)

{"text":"TIMESTAMP(DATE(MID(​文本时间​,1,4),MID(​文本时间​,5,2),MID(​文本时间​,7,2),MID(​文本时间​,9,2),MID(​文本时间​,11,2),MID(​文本时间​,13,2)))","marks":[{"from":{"line":0,"ch":19,"sticky":null},"to":{"line":0,"ch":25,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":35,"sticky":null},"to":{"line":0,"ch":41,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":51,"sticky":null},"to":{"line":0,"ch":57,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":67,"sticky":null},"to":{"line":0,"ch":73,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":83,"sticky":null},"to":{"line":0,"ch":89,"sticky":null},"value":"textField_ksh9bz3r","invalid":false},{"from":{"line":0,"ch":100,"sticky":null},"to":{"line":0,"ch":106,"sticky":null},"value":"textField_ksh9bz3r","invalid":false}],"isCmData":true}

3. Achieve results

4. Try it online

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4