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
 Development Tools
 Other Development Tools
 DateTime Format Problem

Author  Topic 

SKS18
Starting Member

2 Posts

Posted - 2007-03-08 : 06:40:47
My MaintenanceLog table has an entry with following data in a row.
Name: Toney Mirra
ActualDateTime: 2007-02-16 12:55:02.867
PlannedDateTime: 2008-12-05 20:08:57.000
Comments: Sample Entry

But when I run the following query it doesnt return any value.
I think there is some problem in DateTime format. Can anyone help me fixing this?

select Comments from MaintenanceLog where
ActualDateTime = '2/16/2007 12:55:02 PM' and
PlannedDateTime = '12/5/2008 8:08:57 PM'

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-08 : 07:04:56
duplicate http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=80247


KH

Go to Top of Page
   

- Advertisement -