?
Solved

Filter DateTime?

Posted on 2004-05-02
4
Medium Priority
?
727 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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. …
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: …
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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 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