Hello;
Have a table with a field called date_mail, on my form I have two datetimepickers one is named fromdate and the other todate. On exit of todate I want it show in the grid the data of the dates that were choosen. I can do this with codebase, but I'm changing over to SQL99 and having problems getting it to SQL format. Any help would be appreciated, below is the codebase code.
FilterStr = "";
DM->tblResident->Filtered = true;
FilterStr = "(DTOS(DATE_MAIL) >= '" + DTOS(fromdate->Date) + "') .AND. " +
"(DTOS(DATE_MAIL) <= '" + DTOS(todate->Date) + "')";
if(jFilter.IsEmpty() == false && FilterStr.Length() < 60) {
if(jFilter.Pos(".AND." == true) {
DM->tblResident->Filter = FilterStr + jFilter;
}
else {
DM->tblResident->Filter = FilterStr + " .AND. " + jFilter;
}
}
else {
DM->tblResident->Filter = FilterStr;
Thanks
heydyrtt
Have a table with a field called date_mail, on my form I have two datetimepickers one is named fromdate and the other todate. On exit of todate I want it show in the grid the data of the dates that were choosen. I can do this with codebase, but I'm changing over to SQL99 and having problems getting it to SQL format. Any help would be appreciated, below is the codebase code.
FilterStr = "";
DM->tblResident->Filtered = true;
FilterStr = "(DTOS(DATE_MAIL) >= '" + DTOS(fromdate->Date) + "') .AND. " +
"(DTOS(DATE_MAIL) <= '" + DTOS(todate->Date) + "')";
if(jFilter.IsEmpty() == false && FilterStr.Length() < 60) {
if(jFilter.Pos(".AND." == true) {
DM->tblResident->Filter = FilterStr + jFilter;
}
else {
DM->tblResident->Filter = FilterStr + " .AND. " + jFilter;
}
}
else {
DM->tblResident->Filter = FilterStr;
Thanks
heydyrtt