进度4GL / ABL如何将字符串“2015年7月24日”转换为#06/24/2015#date(TS)?

时间:2016-11-21 23:09:57

标签: progress-4gl openedge 4gl

我有字符串 "July 24 2015"是否可以将此转换为日期(TS)数据类型?

它会转换为类似mm / dd / YYYY "07/24/2015 00:00:00.000"

的内容

我可以使用进度4GL吗?

谢谢

1 个答案:

答案 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, " " ))
)).