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 2000 Forums
 Transact-SQL (2000)
 convert

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2005-09-28 : 13:59:25
How can I convert datetime format ( 2004-09-01 00:00:00) to numeric format (20040901)?


Kristen
Test

22859 Posts

Posted - 2005-09-28 : 16:01:46
SELECT CONVERT(int, CONVERT(varchar(8), GetDate(), 112))

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-29 : 01:00:48
What are you going to do with that numeric date?

Madhivanan

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

Kristen
Test

22859 Posts

Posted - 2005-09-29 : 01:08:02
I bit my tongue instead of asking that question!

Kristen
Go to Top of Page
   

- Advertisement -