Solved

Filter DateTime?

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to check if url exists using c++? 6 637
What is the best editor for PowerShell scripts? 7 94
HTML/Webpage Editor for Windows 10 20 165
regex. How to include lines between 10 83
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 perform CRUD operations on a MySql database.

773 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