Solved

CAST vs CONVERT

Posted on 2009-07-10
1
983 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now