Page 1 of 1
Date in filter trouble
Posted: Fri Oct 06, 2006 5:33 pm
by FRED_EMMERICH_(Guest)
I have a date field I calculate from a pssed in value string using riparam(). WHen I put it on the report it shows the correct value. I want to include this date in my filter as a comparison against a date field in my database table. When I am in the filter editor, no fields show up when I try to create the comparison. WHat would cause this? It will only allow me to enter a dtae field from the date/time picker (hard coded date).____I create my date field from cdtd() and I tried it with ctod() and neither one works. What am I doing wrong? The table is Access and the field type is date/time.____thanks__Fred
=> RE: Date in filter trouble
Posted: Sun Oct 08, 2006 8:50 pm
by kfleming
If it is a date it can only be compared to another date field and not a date/time field.____Kathleen__R&R Support
==> RE: Date in filter trouble
Posted: Mon Oct 09, 2006 10:29 am
by FRED_EMMERICH_(Guest)
How would I make this work? My database field is date/time. I attempt to make a date/time using ctdt() and it does not work. What should I do to make everything compatible, type-wise?____thanks__Fred
===> RE: Date in filter trouble
Posted: Mon Oct 09, 2006 2:38 pm
by kfleming
I was just able to compare a calculated field with the expression ctdt("06/12/1991 00:00:00")to a SQL Server date/time field.____Kathleen__R&R Support
====> RE: Date in filter trouble
Posted: Mon Oct 09, 2006 3:41 pm
by FRED_EMMERICH_(Guest)
I am passing in a date through riparam() and apparently CTDT() is NOT making it a date/time field, but just a date field (according to the list of calculated fields)____I am not passing a time component in with riparam(), is CTDT() making it a date-only field in this case?____thanks__Fred____
=====> RE: Date in filter trouble
Posted: Mon Oct 09, 2006 4:23 pm
by FRED_EMMERICH_(Guest)
I got it working. Apprently CTDT() does not generate a date/time field unless you pass it a time value. If you don^t, it creates a date field. Once I passed in 00:00:00 on the end of my string, it worked.