469,362 Members | 2,470 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Data Parsing in SQL Server views

If column1 in SQL Server column is text: 19980701

What is the syntax in the select statement to convert it to a date
like: 07/01/1998

Thanks for any help

Rbollinger

Jul 23 '05 #1
1 1191
You can use CAST() on a string to get a DATETIME data type. Of course,
you know that you do not formatting in the database in a tiered
architecture. And you know that you should only use the ISO-8601
standards for temporal data. If you want to be a bad programmer, you
can use CONVERT(). It is a proprietary piece of legacy syntax that
will let you pick a national format.

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

35 posts views Thread by Troll | last post: by
12 posts views Thread by Jerry Weinstein | last post: by
3 posts views Thread by Pablo Sanchez | last post: by
reply views Thread by Doug R | last post: by
1 post views Thread by Win2003InstallIssues | last post: by
6 posts views Thread by Chad Richardson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.