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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert smalldate to date in Crystal

Status
Not open for further replies.

bpvsc

MIS
Apr 30, 2002
18
US
I am trying to create a formula in Crystal Reports from a smalldate field from a sql server database. Can someone tell me if its possible and what the formula would look like. Is there a way in Crystal 10 that I could use SQL Expression fields to accomplish this. I am new to Crystal 10 so any assistance would be greatly appreciated.

Many Thanks
 
What are you trying to achieve?

Crystal has a lot of formatting for dates as standard. Place your field on design screen, right click and select format field. You can then convert into just about any date format you can think of.

Ian
 
You should be able to use a SQL Expression of:

CAST(table.field as datetime)

I don't have SQL Server available right now or I'd show the equivalent in a Crystal formula.

You'd should supply basic technical information, such as right clicking the field in Crystal and selecting browse data (this will show the data type Crystal recognizes it as), and then also pasting in an example of the data, it doesn't take much more effort to be thorough so please do so in future posts.

-k
 
K
The cast formula worked great in Crystal to.

Thanks for all the assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top