Solved

Filter DateTime?

Posted on 2004-05-02
4
708 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

864 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

24 Experts available now in Live!

Get 1:1 Help Now