I have string like
"July 24 2015"
is it possible to convert this to date(TS) data type?
it would convert to something like mm/dd/YYYY "07/24/2015 00:00:00.000"
Can I do that with progress 4GL?
thank you
I have string like
"July 24 2015"
is it possible to convert this to date(TS) data type?
it would convert to something like mm/dd/YYYY "07/24/2015 00:00:00.000"
Can I do that with progress 4GL?
thank you
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, " " ))
)).
Thank you for the code.
A different version.
define variable inputString as character no-undo.
define variable monthList as character no-undo.
monthList = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".
//update inputString format "x(30)".
inputString = "17-Aug-2022".
display datetime( date(
lookup( entry( 2, inputString, "-" ), monthList ),
integer( entry( 1, inputString, "-" )),
integer( entry( 3, inputString, "-" ))
)).