"today" system date and filters

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

"today" system date and filters

Post by J.A.Houts_(Guest) » Tue Mar 05, 2002 4:52 pm

It seems that R&R for Xbase 8.0 allowed for creating a ^today^ calculated field, and using that field in the filters. How do I get R&R for SQL 9.0 to accept a ^today^ field in a filter so that I do not have to manually enter today^s date each time I run a report?

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

=> "today" system date and filters

Post by kfleming » Tue Mar 05, 2002 5:30 pm

You can create a calculated field with expression:____DATE() to return today^s date as a date field.____But typically fields from your tables will be date/time format rather than time.__So you could create a second calculated field with the expression:____ctod(left(DTTOC(fieldname),at(" ",DTTOC(fieldname))-1))____And that will extract the first part of the date/time field (everything up to the first space) and convert it to a date.____Then in the filter you can select the DATE() calc in the field box and the second calc as the compared to field.____Kathleen__R&R Support

Post Reply