Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Re-formatting old dates

Author  Topic 

OldMySQLUser
Constraint Violating Yak Guru

301 Posts

Posted - 2008-02-18 : 08:49:29
I have a column which contains some strings which are 6 characters in length. They represent old dates such as:

000202 for February 2nd, 1900

How can I search for these strings and reformat them to something I can later convert to datetime format please i.e. 19000202?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-18 : 08:57:10
What determines whether 00 is year 1900 or 2000?
Go to Top of Page

OldMySQLUser
Constraint Violating Yak Guru

301 Posts

Posted - 2008-02-18 : 09:07:19
quote:
Originally posted by visakh16

What determines whether 00 is year 1900 or 2000?



00 is 1900
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-18 : 09:09:20
This is what you need
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82164

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

OldMySQLUser
Constraint Violating Yak Guru

301 Posts

Posted - 2008-02-18 : 09:13:44
quote:
Originally posted by madhivanan

This is what you need
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82164

Madhivanan

Failing to plan is Planning to fail



Many thanks for that excellent link. Much appreciated.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-18 : 09:19:15
quote:
Originally posted by OldMySQLUser

quote:
Originally posted by madhivanan

This is what you need
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82164

Madhivanan

Failing to plan is Planning to fail



Many thanks for that excellent link. Much appreciated.


You are welcome

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -