Solved

CAST vs CONVERT

Posted on 2009-07-10
1
994 Views
Last Modified: 2012-05-07
What is the difference between CAST and CONVERT ?
0
Comment
Question by:finance_teacher
1 Comment
 
LVL 2

Accepted Solution

by:
MPDeveloper earned 500 total points
ID: 24827806
I'm going to assume that you meant to put this in the Sql area since CAST and CONVERT are not C# keywords.

CAST is ANSI standards based where CONVERT is SQL server only so use CAST if you're planning on executing this on other database versions. CAST is better at preserving decimal places, but CONVERT allows you to format the output. CONVERT has a third parameter that allows you to input a formatting string.

Other then that, they're very similiar.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question