Page 1 of 1

Converting datetime database field to Date

Posted: Fri Dec 28, 2012 4:04 pm
by Orasis
I'm trying to convert a datetime field to a Date type (without the time) so I can then compare it with a date parameter.

At the moment this is what I'm selecting from the datasource:
SELECT ApptDate
FROM Diary
I have then tried to apply a filter to the report to check if column field ApptDate is equal to expression Date (being the parameter variable).

I have also tried the following filter expression:
{Format("{0:MM.dd.yyyy}", Diary.ApptDate)} = Date
but it returned errors.


Can you point me in the right direction please? Surely this can't be too difficult.
Crystal Reports has a Date() function that allows this. Is this something you can look to build in future?

Re: Converting datetime database field to Date

Posted: Sat Dec 29, 2012 7:14 am
by Alex K.
Hello,

Can you please send us your report with test data which reproduces the issue for analysis.

Thank you.