how to search using date

deepakaa
01-08-2004, 05:11 AM
hello guys

i want to search my database using date which is one of the fields....i tried using following statement but it doesnt work

Set adorecordset_recevoi = envoi_recevoi.Execute("Select * from recevoi where [societe]= '" & Text1.Text & "'")

where text1 is the textbox in which user is supposed to write date

my date format is, for example, 08/01/2004

pls help

thanx alot.

00100b
01-08-2004, 05:15 AM
Try formatting the date to be mm/dd/yyyy.

strSql = "SELECT * FROM recevoi WHERE [societe] = '" & Format(Text1.Text, "mm/dd/yyyy") & "'"
Set adorecordset_recevoi = envoi_recevoi.Execute(strSql)

Dennis DVR
01-08-2004, 05:31 AM
hello guys

i want to search my database using date which is one of the fields....i tried using following statement but it doesnt work

Set adorecordset_recevoi = envoi_recevoi.Execute("Select * from recevoi where [societe]= '" & Text1.Text & "'")

where text1 is the textbox in which user is supposed to write date

my date format is, for example, 08/01/2004

pls help

thanx alot.

Set adorecordset_recevoi = envoi_recevoi.Execute("Select * from recevoi where [societe]= #" & Text1.Text & "#")

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum