我有字符串
"July 24 2015"
是否可以将此转换为日期(TS)数据类型?
它会转换为类似mm / dd / YYYY "07/24/2015 00:00:00.000"
我可以使用进度4GL吗?
谢谢
答案 0 :(得分:3)
define variable inputString as character no-undo.
define variable monthList as character no-undo.
monthList = "January,February,March,April,May,June,July,August,September,October,November,December".
update inputString format "x(30)".
display datetime( date(
lookup( entry( 1, inputString, " " ), monthList ),
integer( entry( 2, inputString, " " )),
integer( entry( 3, inputString, " " ))
)).