You are here: Format for six character date « MsSQL Server « IT news, forums, messages
Format for six character date

Posted by robboll on 09/04/07 05:56

Using SQL Server 2000 in a view, if the data is Char and six
characters like: 081564

How do I convert it to a date that looks like: 08/15/1964 and is a
date.

I am trying:

CONVERT (varchar, SUBSTRING(Col005, 1, 2) + '/' + SUBSTRING(Col005, 3,
2) + '/' + SUBSTRING(Col005, 5, 2), 112)

but it returns 08/15/64. Anyone tell me what I'm doing wrong.

Thanks in advance!

RBolling

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация