如何将字符串值转换为正确的日期时间格式 [英] How to convert string value to proper datetime format
本文介绍了如何将字符串值转换为正确的日期时间格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用水晶报表 7
我想在水晶报表中将字符串值转换为日期时间
I want to convert the string value to datetime in crystal report
日期格式是
20120102 (yyyymmdd)
20120105
...
我想把上面的字符串转换成这样的日期格式
I want to convert the above string to date format like this
预期输出
02/01/2012
05/01/2012
...
需要水晶报表公式帮助
推荐答案
你可以试试 DateValue 函数:
You could try the DateValue function:
DateValue({myTable.strDate})
否则,解析它:
Date({myTable.strDate}[1 to 4], {myTable.strDate}[5 to 6], {myTable.strDate}[7 to 8])
这篇关于如何将字符串值转换为正确的日期时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文