Date Problem

  • Thread starter Kaspro via AccessMonster.com
  • Start date
K

Kaspro via AccessMonster.com

Hi all...i have a small date issue which is i have a textbox used to search
in my database using date, and i'm using a "shortdate" input mask for the
textbox, but the problem is that i have to start the date with month/day/year
to perform the search and what i need is to start with day/month/year,
despite that the database result always appears with day/month/year format,
so i dont know what to do?!!!
Thanks alot!
 
K

Kaspro via AccessMonster.com

What's really annoying is that everything is set to "dd,mm,yyyy" and in my
regional setting too and in my access forms also appears as "dd,mm,yyyy"
except when i'm searching i have to enter it as "mm,dd,yyyy" which is very
wierd!!!!
and here's all the setting and how i search:
for the date textbox the format is set to "short date"
and the input mask is set to to "short date" too
and here's the sql statment
"SELECT * FROM Expenses WHERE Date = #" & Me.txtDate.Value & "#"
so i dont know what's going wrong?!
 
K

Kaspro via AccessMonster.com

I think i got a way around this problem....i used the Format functions to
format the date which is entered by the user to the date that is stored in
the database like this:
Format(Me.txtDate1, "mm,dd,yyyy")
Coz i think the problem is that how's the date is stored in the database and
i think its working fine now!
 
K

Kaspro via AccessMonster.com

I think i got a way around this problem....i used the Format functions to
format the date which is entered by the user to the date that is stored in
the database like this:
Format(Me.txtDate1, "mm,dd,yyyy")
Coz i think the problem is that how's the date is stored in the database and
i think its working fine now!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top