Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime Issue

Status
Not open for further replies.

R00k1e

Technical User
Apr 26, 2011
6
US
Hello,

I have a View created in SQL Server that has a column with date information as a varchar. I did a Cast to that column to make it a DateTime. So in Crystal, that field displays as a DateTime but when I go to Select Expert and try to make it equal to my "DateTime" type parameter, it won't pick up. Is there something I have to do differently on the SQL end to make this work?

Any help would be greatly appreciated.

 
Go to field explorer and open database, right click any field and check show field type.

Does Crystal see it as datetime?

Ian
 
Hi Ian,

Yes, Crystal does show the field as a DateTime.

BTW I am using Crystal 9.
 
Ok don't use the select expert wizard.

Go into the select formula and manually enter field and parameter as you would with a normal formula.

That should allow you to use it.

Ian
 
I think you might have to add datetime formatting in the cast function. I've found that to be the case when converting dates in commands. Place both the parameter and the datetime field on the report canvas and see how they display.

-LB
 
The Select Expert thinks a date parameter and a date time field are different types.

You will need to use the Record Selection Formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top