Click to See Complete Forum and Search --> : Dates within SQL being a pain!


IanPye
February 14th, 2000, 08:43 AM
Hi,

I am using VB6 with a Microsoft Access ODBC database back end.

I have a date within a particular table, formatted as dd/mm/yyyy (UK Format)

When using a SQL query I do the following


SELECT * FROM SOMETABLE WHERE MYDATE = 14/02/2000




The database returns zero records even though I know that records are present which meet this criteria. I have tried different formats but with no luck :(

Can anyone help?

TIA

Ian

Lonely Wolf
February 14th, 2000, 09:27 AM
Have you tried this ?

SELECT * FROM SOMETABLE WHERE MYDATE = 14022000



Sometimes data is written without separatros.

IanPye
February 14th, 2000, 10:10 AM
Its ok, after an hour of trying I've worked it out!!!

used # before and after my date criteria

Ian