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)
 select datetime

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-01-11 : 04:53:36
i have a datetime field
is there a way to select it to come up in the format of ddmmyyyy (where is the day is 3 it will put 03)
is there an automatic function for this?

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2007-01-11 : 04:58:05
select replace(convert(varchar, getdate() - 4, 103), '/', '')

Duane.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-01-11 : 05:26:12
You might also want to take a look here. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76862


KH

Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-01-11 : 05:36:16
thanks just what i needed :)
Go to Top of Page
   

- Advertisement -