I am trying to convert for ex. 12012008 to 12/01/2008 in 4gl code. There is going to be a list of dates so I am trying to figure out the simplest way in which to code it...any suggestions?
You really shouldn't have to do anything. Informix 4GL is very good at performing conversions if it can. This example sets a date equal to a character string. If it's a correct date it'll display. If not, variable dd is set to null
Code:
main
define dd date,
str char(10)
let str = "12012008"
let dd = str
display dd # should display 12/01/2008
end main
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.