different date format per user?? Heeeeeeeeelp

G

Guest

Hello,
I have a very weird case on my hand. In a search page, I generate the query
depending on the column the user wants to search. And everything was smooth
till I realized that other users than mine get their date changed to American
format?!

I store the dates in database in dd/mm/yyyy, and format the dates like this
before sending it to search in Database.

I tested in the same pc's with different users. With mine, administrator of
SQL server, it works fine but for rest changes the format to mm/dd/yyyy!

Any suggestions would be greatly appreciated, because I am not sure where to
go from here!

Reza
 
J

Joshua Flanagan

What problem are you trying to solve? Is someone typing in a date in a
format you cannot handle? Explain the input that you cannot handle and
how you would like it to behave.

One problem I see is that it sounds like you store your dates as strings
(varchar) in SQL Server (since you say you store it with a specific
format) instead of datetime.
 
G

Guest

The problem was for example, I wanted to find all the registered items with
the date: 13/07/2005
when it came to searching, it was actually swapping the day with month, so
was searching 07/13/2005

The problem was the configuration of the users in the database. I assumed
since the users are portugues, their Default Language should be that also -
wrong. The problem was solved when I changed it to English.
 
E

Edwin Knoppert

..TOADATE makes it a double and you can use a fix'd (Fix()) for SQL
statements like
And field = CVDate( ' & Cstr(the date value) & "')....
Check the SQL syntax, i did it from mind.
 

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

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top