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
 General SQL Server Forums
 New to SQL Server Programming
 Removing Time Stamp from DateTime field

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2009-02-23 : 10:49:46
Hi Group:

I need to remove the time stamp from DateTime stam data. I just need the day for example '02/23/2009'

Thank you for the help.

raky
Aged Yak Warrior

767 Posts

Posted - 2009-02-23 : 10:54:23
select convert(varchar(30),getdate(),101)
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-02-23 : 10:58:27
use 101. 103 will give you dd/mm/yyyy.

select convert(varchar(30),getdate(),101)
Go to Top of Page

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2009-02-23 : 11:00:36
Thank you both
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2009-02-23 : 11:33:37
welcome....For more formats refer below link

http://www.sql-server-helper.com/tips/date-formats.aspx
Go to Top of Page
   

- Advertisement -