Date in filter trouble
-
- Posts: 170
- Joined: Tue Oct 10, 2017 12:44 pm
Date in filter trouble
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
If it is a date it can only be compared to another date field and not a date/time field.____Kathleen__R&R Support
-
- Posts: 170
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Date in filter trouble
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
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
-
- Posts: 170
- Joined: Tue Oct 10, 2017 12:44 pm
====> RE: Date in filter trouble
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____
-
- Posts: 170
- Joined: Tue Oct 10, 2017 12:44 pm
=====> RE: Date in filter trouble
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.