[AccessD] Date syntax in SQL Server

Arthur Fuller artful at rogers.com
Wed Jun 23 08:37:41 CDT 2004


You don't need the convert. You can just go SELECT * FROM someWhere
WHERE ADateColumn >= "01-01-2004"

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Sunday, June 13, 2004 12:12 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Date syntax in SQL Server


But why does it need the convert?  Just part of SQL Server?

John W. Colby 
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of vchas
Sent: Sunday, June 13, 2004 12:00 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Date syntax in SQL Server


In sql dates are treated like strings, use single quotes not # 

Good Luck

V
www.vinniechas.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Saturday, June 12, 2004 8:46 PM
To: 'Access Developers discussion and problem solving'; SQLServer
Subject: [AccessD] Date syntax in SQL Server


What is the syntax for dates in SQL Server?

WHERE     (DateOfBirth >= CONVERT(DATETIME, '1970-01-01', 102))

I need to get rid of the convert.  Bracketing in ## doesn't work.

John W. Colby 
www.ColbyConsulting.com


-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list