Compare strings as dates in i4gl


I'm trying to write a query where I've to compare two strings as dates. The details are as follows:—
The code is as follows



The column sanc_det in table t_leave_rc is defined as type CHAR(50).



The first 10 characters in t_leave_rc.sanc_det
contain leave sanction date of employees in
dd/mm/yyyy format.



I'm taking ddmm and yyyy as input from user to construct frm_dt and to_dt, so I've to define it as CHAR(8).



I'm trying to compare above two CHAR types, namely t_leave_rc.sanc_det[1,10] and frm_dt, to_dt (concatenated) but I'm getting the wrong output in the results.



Please suggest a solution so that I can get the correct output in the query.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

The Dalles, Oregon

眉山市

清晰法令