Date in filter trouble

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

Date in filter trouble

Post by FRED_EMMERICH_(Guest) » Fri Oct 06, 2006 5:33 pm

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Date in filter trouble

Post by kfleming » Sun Oct 08, 2006 8:50 pm

If it is a date it can only be compared to another date field and not a date/time field.____Kathleen__R&R Support

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Date in filter trouble

Post by FRED_EMMERICH_(Guest) » Mon Oct 09, 2006 10:29 am

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Date in filter trouble

Post by kfleming » Mon Oct 09, 2006 2:38 pm

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

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Date in filter trouble

Post by FRED_EMMERICH_(Guest) » Mon Oct 09, 2006 3:41 pm

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____

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

=====> RE: Date in filter trouble

Post by FRED_EMMERICH_(Guest) » Mon Oct 09, 2006 4:23 pm

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.

Post Reply