954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

date query problem

Hi friends,
I am unable to fetch out correct result on date base. I am writing following code for fetching all records of a table between two dates.

db.execute"select * from travel where doj between '"& doj.text &"' AND '"& doj1.text &"';"

but above query can't give record between specified date.

Thanking you

pardeep3dec
Junior Poster in Training
90 posts since Jul 2008
Reputation Points: 10
Solved Threads: 1
 

hi. try this.

db.execute"select * from travel where doj between #" & doj.text &"# AND #" &  doj1.text 
& "# 

db.execute"select * from travel where doj between cdate('" & doj.text  & "') AND cdate('" & doj.text  & "')
AUGXIS
Light Poster
45 posts since Dec 2007
Reputation Points: 11
Solved Threads: 11
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You