Re: VB, Informix and selecting by date woes
Posted in 2000
Rob Stevens (rob@teleflorist.co.uk) wrote: : thanks for all your help so far... : ok, after much fiddling I've got the following line to work (notice I had to : reverse the date and enter it as YY/DD/MM): : rs.Open "SELECT * From member WHERE l_date_joined = '49/01/01'", cn : problem now is that as soon as I specify a four digit year (eg 1949 as I : would like to do above) I get a string to date conversion error from the : odbc driver! : any ideas? Go to the Control Panel and check your regional settings for Dates and Datetimes. I would wager you have it set to yy/MM/dd. ODBC drivers seem to take this date mask when you use Windows as the client. Another option is to use the MDY function: rs.Open "SELECT * FROM member WHERE l_date_joined = MDY(1,1,1949)", cn