Date/time field accessing

I am at the begin with SQL-server, so for the begin i want to test the value of a datetime field in a table. For example if the content of the field named "danast" is equal with '02.01.1983'. In the documentation witch I've downloaded for SQL-server are explained many things but i did not find any example for a comparation of this type. I've tried such a comparation also in MSAccess (danast=#02.01.1983#) and in C++ (on a ODBC connection at a MSAccess database) and I received errors. My experience with SQL language is limited at 6-7 years with Oracle and FoxPro but in those programs exists explicit convertion functions from string to date type. Could anyone give me the correct sintax and an advice from where should I begin with the examples and sintax for the data type utilisation in SQL-server and SQL for ODBC connections in C++ on .mdb?
[864 byte] By [Misu_for_friends] at [2008-2-20]
# 1

The # sign will not be recognized in SQL Server as a string delimiter. You need to use single quotes as shown in the following examples.

USE Northwind
GO
SELECT *
FROM Orders
WHERE ShippedDate = '07-16-1996'

SELECT *
FROM Orders
WHERE ShippedDate < '1996.07.16'

SELECT *
FROM Orders
WHERE ShippedDate LIKE '%1996%'

gaile at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Documentation...
# 2

hi,

sql server have date funcations include DATEADD, GETDATE and DATEDIFF function,
this funcations will help you calculate date.

--
software reviews

alansnoog at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Documentation...

SQL Server

Site Classified