[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

Set sql statement for Date

Is there any way to 'select' all record with particular date value, without specifying the time value ?

I have tried with the following command :

Select * from db1 where mydate like "12/11/1998"

but it always fails (no result return). I guess it's because I didn't use the complet date format, including the time portion.

For examples : I want to list all records with date value "1 january 98", how the sql statement should be ?
0
asiasoft
Asked:
asiasoft
  • 2
1 Solution
 
watyCommented:
You have to include the dates between #.

Select * from db1 where mydate = #12/11/1998#
0
 
asiasoftAuthor Commented:
Sorry Waty, I have tried that way and still not working.

thanks

0
 
mcixCommented:
SELECT * from DB1
WHERE
mydate Between #1/1/98# And #1/1/98 11:59:00 PM#
0
 
asiasoftAuthor Commented:
Well, actually I hope there would be simpler way than that way. Anyway, thanks for the answer
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now