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
 SQL Server Development (2000)
 Query which is based on datetime field

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-13 : 08:53:08
Francis martin dias writes "Sir,

Please help in solving a Query.

In my table TabModified there is a field Modified_Date.


how to display all the records from a table, which were modified after the date and time 10/10/2001 10:10:40 AM ?

i.e I should get the result as

10/10/2001 10:12:40 AM
10/10/2001 11:12:40 AM
10/10/2001 03:12:40 PM

(all the records which were modified/entered before 10:10:40 AM should not be displayed)


Thank you

Francis Martin Dias"

Nazim
A custom title

1408 Posts

Posted - 2002-03-13 : 09:06:45
select * From tablename
where datefield > '10/10/2001 10:12:40 AM'

you can look at convert in BOL.

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -