cancel
Showing results for 
Search instead for 
Did you mean: 

FIND Datawindow and Datetime column ?

Former Member
0 Kudos

" How to make a find in a datawindow on a column
of type(chap) datetime (date Oracle)?

When I use the find function(office) I receive an
error message " typical mist Expression match ".

The code is :

datetime dtt_debut

long nbrow7, rownumfind2

string ls_find

//

nbrow7=dw_7.rowcount()

//
dtt_debut=dw_7.getitemdatetime(3,"absag_datedebut")
//

ls_find="absag_datedebut="+string(dtt_debut)
rownumfind2=dw_7.find(ls_find,1,nbrow7)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pascal;

  Try ....

ls_find = 'absag_datedebut = Date ( "' + string(dtt_debut, "yyyy-mm-dd") + '")'

rownumfind2=dw_7.find(ls_find,1,nbrow7)

Regards ... Chris

Former Member
0 Kudos

This code removes the time information from datetime!

Former Member
0 Kudos

HI Rene;

  Yes, I saw that after I posted it that Pascal wanted to use a DT data type. So my example code would then become ....

ls_find = 'absag_datedebut = DateTime ( "' + string(dtt_debut, "yyyy-mm-dd  hh:mm:ss") + '")'

Thanks for pointing that out.

Regards ... Chris

Answers (2)

Answers (2)

Former Member
0 Kudos

Both examples work.

Thank you you can close the case

Pascal

Former Member
0 Kudos

Great news Pascal!  

All the best with the rest of your project.  

Former Member
0 Kudos

ls_find="absag_datedebut=datetime('"+string(dtt_debut)+"')"