hi.how can i filter dates from the database in crystal report syntax?
i tried {tblname.datetimefield} >= format(text1,"yyyy-mm-dd") and (tblname.datetimefield} <= format(text2,"yyyy-mm-dd").

but this gives me error, "a date is required here".
my database field is in datetime data type.with format 0000-00-00

i also tried Date({tblname.datetimefield} )>= format(text1,"yyyy-mm-dd") and Date({tblname.datetimefield} <= format(text2,"yyyy-mm-dd"). but still it gives me error.

im using mysql, vb6 and crystal report 8.5.

please help me.
i need this..thanks..

Recommended Answers

All 2 Replies

Hi,

Try this :

" {tblname.datetimefield} In Date(" & format(text1,"yyyy,mm,dd") & ") " _
& " To Date(" & format(text2,"yyyy,mm,dd") & ") "

Regards
Veena

hey QVeen72. Thanks for the reply.
It works.
many Thanks.. :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.