Sorry missed a parantheses:
cast(c1.key2 as smalldatetime) = convert(smalldatetime,cast
Main Topics
Browse All TopicsI am trying to use a filter to see what contacts have a birthday on the current day. Birthday is in field key2. What am I doing wrong?
My dBase expression is
upper(contact1->key2) >= DtoS(date())
My SQL query is
datediff(day, c1.key2, getdate()) < 1
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Your best off converting key2 to a date field since there are so many combintions of a date that can be entered (e.g. 02/01, 2/1, 02/1, 2/01). Looks like I neglected to append the current year in my original example, so the final solution will be ugly but the logic is correct. I don't have Goldmine near me...so let me know if this gives you an error in which case I'll provide an example over the weekend.
cast(c1.key2 + '/' + cast(year(getdate()) as varchar(4)) as smalldatetime)
=convert(smalldatetime,cas
FYI.... If you create a UDOB (date) field, GoldMine can automatically calculate the age of the person. Just add an expression field to the Fields Tab using:
Age(contact2->udob)
You can create the UDOB (date) field and use Tools | Global replace to copy the data from the old field to the new field, but the data might not translate well due to going from character to date. You could try CTOD() expression.
Business Accounts
Answer for Membership
by: TommyTupaPosted on 2008-01-31 at 14:34:53ID: 20792039
It would be best to truncate the time portion and do an 'equals' comparison on the date.
(getdate() as varchar(12)),101)
The sql query will be:
cast(c1.key2 as smalldatetime = convert(smalldatetime,cast
Not sure about the dbase expression. Let me know if you need it.