Solved

Filter DateTime?

Posted on 2004-05-02
4
707 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
Comment Utility
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
Comment Utility
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
Comment Utility
Or

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

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now