Kamis, 29 Juli 2010

CAST vs CONVERT

Both these functions are used to convert values from one datatype to another But there are some differences between them 1 CAST is ANSI standard and CONVERT is specific to SQL Server 2 CAST can't be used for formating purposes. But CONVERT can be used for formating purposes particularly on datetime and money datatype declare @d datetimeset @d='20001210 12:34:22'select convert(varchar(10),@d,108)

Tidak ada komentar:

Posting Komentar