Problem with find.
Long ll_found
String ls_findexp, as_date, as_time
ls_date = '09/17/2003 15:06:00'
ls_time = '12:00:00'
Scenario 1:
ls_findexp = "DateTime(crit_date,Time("+as_time+") <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
Scenario 2:
ls_findexp = "DateTime(crit_date,Time(as_time)) <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
Scenario 3:
ls_findexp = "crit_date <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
crit_date is the column in the table with date data type. (No time available in the table - populating dynamically).
Need to compare the datetime value with datatime value.
In 1, 2 the scenarious ll_found returning -5 (problem with expression). Scenario 3 works fine.
Any help would be appreciated
Long ll_found
String ls_findexp, as_date, as_time
ls_date = '09/17/2003 15:06:00'
ls_time = '12:00:00'
Scenario 1:
ls_findexp = "DateTime(crit_date,Time("+as_time+") <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
Scenario 2:
ls_findexp = "DateTime(crit_date,Time(as_time)) <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
Scenario 3:
ls_findexp = "crit_date <= DateTime ('" + as_date + "')"
ll_found = ids_critdt.Find(ls_findexp,1,ids_critdt.RowCount())
crit_date is the column in the table with date data type. (No time available in the table - populating dynamically).
Need to compare the datetime value with datatime value.
In 1, 2 the scenarious ll_found returning -5 (problem with expression). Scenario 3 works fine.
Any help would be appreciated