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
 Eliminating the Time from Time Stam in SQL

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-07-29 : 15:54:53
Hi Group,

I need help eliminating the time stamp from the SQL datetime stamp.

Thanks for the help!!!!!! Viva this WebSite.


7/29/2008 12:00:00 AM

mfemenel
Professor Frink

1421 Posts

Posted - 2008-07-29 : 15:56:32
Look at convert, you have some different formats to choose.
select convert(varchar(20),getdate(),110)

Mike
"oh, that monkey is going to pay"
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-29 : 15:57:01
You shouldn't be doing this in SQL, but rather it should be done in your application.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-07-29 : 16:00:53
Thank you Tara
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-29 : 21:50:22
[code]select dateadd(day, datediff(day, 0, getdate()), 0)[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-30 : 02:53:25
<<
Viva this WebSite.
>>

What does this mean?

Madhivanan

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

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 04:15:56

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

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-30 : 12:41:35
quote:
Originally posted by madhivanan

<<
Viva this WebSite.
>>

What does this mean?



It's like Viva Las Vegas. Viva means "long live".

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-31 : 04:08:16
quote:
Originally posted by tkizer

quote:
Originally posted by madhivanan

<<
Viva this WebSite.
>>

What does this mean?



It's like Viva Las Vegas. Viva means "long live".

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog



Thanks

Madhivanan

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

- Advertisement -