Problem with date

mariaProgress

New Member
Hello,
I'm having problem with this query:


DEFINE VARIABLE date1 AS CHARACTER FORMAT "99/9999" . /* FORMAT "99/9999" => month/yeear */

date2 = date(INT(SUBSTRING(date1:SCREEN-VALUE,1,2)),1,int(SUBSTRING(date1:SCREEN-VALUE,3))).

date3 = date(INT(SUBSTRING(date1:SCREEN-VALUE,1,2)) + 1,1,int(SUBSTRING(date2:SCREEN-VALUE,3))) - 1 .


OPEN QUERY Q_frais FOR EACH frais WHERE ( frais.DATE >= date2 AND frais.DATE <= date3 ) .

this query didn't work, it dispalay that didn' accept the / in date .

if I use this format : DEFINE VARIABLE date1 AS CHARACTER FORMAT "999999" , it work . but I would use this format "99/9999" .

thank you .
 
The date:screen-value has a slash in position three so progress can't covert it to an int.
Try changing the index from 3 to 4.
 
Top