Hi,
Below is a sql string I use to open a recodset in VB. The problem I have is
with the date format. The database I use is SQL Server which holds dates as
a datetime data type. All my dates in this database field are of the type
23/02/02 etc as I just imported a lot of data from MS Access. But the below
query doesnt work and I have been 2 days trying all sorts of things such as
CDate function etc. It doesnt seemm to take any notice of the date criteria
at all.
Does anyone know what the syntax should be for this work? I know when I
write a view in MSSQL the date format has to be '2002-02-23' for it to work.
This is driving me mad again!
SQL = "SELECT recorda" _
& "From TTime " _
& "where TTime.date =" & "'" & Format(today, "dd-mm-yy") & "'"
Thanks
Niall
Niall Hannon
Management Information Systems
___________________________________________
FINEOS
Pembroke House
8 - 10 Lower Pembroke St
Dublin 2
Ph: +xxx x xxxxxxx
Fax: +xxx x xxxxxxx
Why don't you visit our website at http://www.FINEOS.com
ENTERPRISE SOLUTIONS FOR BANKING AND INSURANCE
___________________________________________
**************************************************************************
The information contained in this e-mail is confidential,
may be privileged and is intended only for the use of the
recipient named above. If you are not the intended
recipient or a representative of the intended recipient,
you have received this e-mail in error and must not copy,
use or disclose the contents of this email to anybody
else. If you have received this e-mail in error, please
notify the sender immediately by return e-mail and
permanently delete the copy you received. This email has
been swept for computer viruses. However, you should
carry out your own virus checks.
Registered in Ireland, No. 205721. http://www.FINEOS.com
**************************************************************************