Solved

Filter DateTime?

Posted on 2004-05-02
4
713 Views
Last Modified: 2013-12-26
Hi every body ..
I have datawindow with column of type "datetime" ,if I made filter on this column there is error message said "Type of expression must match".
Any body tell me How I make filter on datetime column?
Regards
0
Comment
Question by:buty
  • 2
4 Comments
 
LVL 18

Expert Comment

by:diasroshan
ID: 10970689
hi,

if ur applying a filter during design time then try the following,,,

UR filter criteria:

<columnname> = Date('12-12-2004')  // or,

<columnname> = Date(arg_date)  // where arg_date is ur argument...

assuming ur column name is <columnname>..
try passing ur argument as a date...

by using Date() ur type of expression must match error wont pop...

if this doesn't help paste ur code...let me check where u go wrong...

Cheers,
Rosh
0
 
LVL 33

Accepted Solution

by:
sajuks earned 125 total points
ID: 10974353
Example:

ld_datefiled = Date(em_date.Text)
ls_string = "(somecolumn >= DateTime('" + string(ld_datefiled, "yyyy/mm/dd
hh:mm:ss") + "')) "
0
 
LVL 33

Expert Comment

by:sajuks
ID: 10974358
Or

dw_1.SetFilter("datetime(datefield)=datetime('dd/mm/yy')")
0
 
LVL 1

Expert Comment

by:sandhiyaa
ID: 10975546
Hi,
paste the filter condition u have given in the appln.
Regards,
Sandhiya
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question