How to convert string value to proper datetime format

后端 未结 4 1115
时光说笑
时光说笑 2020-12-11 19:32

Using crystal-report 7

I want to convert the string value to datetime in crystal report

date format are

20120102 (yyyymmdd)
20120105
...
         


        
4条回答
  •  一整个雨季
    2020-12-11 20:12

    The above answer does not work for a typical date that is currently in the string format yyyymmdd. The "left" and "right" need to be swapped.

    (date (ToNumber (Left  ({?LD}, 4)),
           ToNumber (Mid   ({?LD}, 5, 2)),
           ToNumber (Right ({?LD}, 2))
          )
    

提交回复
热议问题