Link to home
Start Free TrialLog in
Avatar of philcrouch
philcrouch

asked on

BIG DATE PROBLEM

OK guys....

i have a sql query that says

"select * from ra where where start < #" & text1.text & "#"

now text1 is a date field.... i have tryied putting it to a dim and i have tried to use monthview as well but no matter how i do it does not recognise the date correctly...

i want it to be dd/mm/yyyy and it just wants to see it as mm/dd/yyyy.

any ideas...

i am australian if you are wondering why
Avatar of geowilli
geowilli

It is best to convert your date to a long date string before using it in the SQL statement.  Eg.

dim strDate as string

strDate = format(text1.text, "MMMM dd, yyyy")

select * from ra where where start < #" & strDate & "#"


This will convert "01/06/2000" to "June 1, 2000"


Avatar of philcrouch

ASKER

what about the database that it is searching the values are in short date format
ASKER CERTIFIED SOLUTION
Avatar of geowilli
geowilli

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Comment accepted as answer
It does work....

if anyone is interested in the correct way to fix a date problem....look at this one......

thanks very much

where are you from......

we also use dd/mm/yyyy
I am from the country of Belize in Central America.  It's a former British Colony therefore we use their date format.
very interesting.....

thanks for the help