Report between two dates

Hi friends
I have to find out report between two dates. (I am using VB 6 language and MS Access as Database). My following query executes fine if date format is d/M/yyyy in Control Panel.

Dim s as string

s = "select * from customer where dat between #" & DTPicker1.Value & "# and #" & DTPicker2.Value & "# "

Rec.Open s, Con, 1, 3



But when I changed the format from d/M/yyyy to d/M/yyyy. My above query executes but it does not show correct result.

Plz Plz tell me solutiuon. I will be very thankful to you.

Comments

  • : Hi friends
    : I have to find out report between two dates. (I am using VB 6 language and MS Access as Database). My following query executes fine if date format is d/M/yyyy in Control Panel.
    :
    : Dim s as string
    :
    : s = "select * from customer where dat between #" & DTPicker1.Value & "# and #" & DTPicker2.Value & "# "
    :
    : Rec.Open s, Con, 1, 3
    :
    :
    :
    : But when I changed the format from d/M/yyyy to d/M/yyyy. My above query executes but it does not show correct result.
    :
    : Plz Plz tell me solutiuon. I will be very thankful to you.
    :
    :

    Makethe question clearer : you are saying "But when I changed the format from d/M/yyyy to d/M/yyyy" . You must have meant d/M/yyyy to Mm/dd/yyyy ?

    Any reason why you are changing the format ?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion