Afraits
Well-known member
What does sSQLFilter contain once the variables have been dropped in?
samsmithnz said:Is the # required in MYSQL? I know you need it in Access, but forgive my MYSQL ignorance...?
penfold69 said:Use.... Parameters.....
Or.. Read the MySql documentation.
DATE / DATETIME fields in mysql are stored in the format: YYYY-MM-DD HH:MM:SS.xx as a *STRING*
Therefore, the ToString() function of cbx_date1.Value (which is being implicitly returned) will return something to the ilk of: MM/DD/YYYY HH:MM:SS.xx
As you see, if you look closely.. those wont EVER compare correctly.. so..
1. Use parameters
2. Write a function to convert a .NET Date/Time to a MySql Compatible Date/Time
p.s. - the actual answer to the delimiting question - MySQL uses s to delimit a date, not ##s