Home All Groups Group Topic Archive Search About
Author
8 Jul 2006 4:22 AM
Goh
Hi guy,
    How can we make sure the date format that we pass in MS Access are
constantly the format that we wish.
    I ask this is because My select statement work in some computer and some
not. Even  I have check the computer system date format there are same. What
will effect the date format in MS Access. How to prevent this thing happen.
I can't use access anymore if it work like that.

   Thanks in advance,

With regards,
Goh

Author
8 Jul 2006 12:02 PM
Miha Markic [MVP C#]
Use parametrised query instead, something like: select * from somewhere
where datefield = ?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"Goh" <goh@noemail.noemail> wrote in message
news:%23Iq4xUkoGHA.3900@TK2MSFTNGP04.phx.gbl...
> Hi guy,
>    How can we make sure the date format that we pass in MS Access are
> constantly the format that we wish.
>    I ask this is because My select statement work in some computer and
> some not. Even  I have check the computer system date format there are
> same. What will effect the date format in MS Access. How to prevent this
> thing happen. I can't use access anymore if it work like that.
>
>   Thanks in advance,
>
> With regards,
> Goh
>
Author
10 Jul 2006 2:41 AM
Kevin Yu [MSFT]
Hi Goh,

I agree with Miha, that we can use parameterized query to overcome the
format issues.

In addition, the MS Access stores DateTime with 8 bytes. It doesn't stores
any format information in the database. The format/culture information is
used according to the machine's regional settings.

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Author
8 Jul 2006 2:21 PM
Cowboy (Gregory A. Beamer)
I assume you are dealing with globalization issues (i.e., some comupters
belonging to people in some countries have different date formats). If so,
switch to a common globalization setting before saving to the database.

http://www.c-sharpcorner.com/Code/2005/April/GlobalizationusingASP.NET.asp

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
Show quote
"Goh" <goh@noemail.noemail> wrote in message
news:%23Iq4xUkoGHA.3900@TK2MSFTNGP04.phx.gbl...
> Hi guy,
>    How can we make sure the date format that we pass in MS Access are
> constantly the format that we wish.
>    I ask this is because My select statement work in some computer and
> some not. Even  I have check the computer system date format there are
> same. What will effect the date format in MS Access. How to prevent this
> thing happen. I can't use access anymore if it work like that.
>
>   Thanks in advance,
>
> With regards,
> Goh
>

AddThis Social Bookmark Button