How the users see dates and how dates are stored and recognized by the
database engine are two very different things.
In SQL Server, datetimes are stored as paired integers, the first
representing the # days since the seed date and the second representing the
# of msec's since midnight.
This is different from Jet, which stores them as decimal numbers, with the
whole number representing the days since the seed date and the decimal
representing the time of day (.0 = midnight, .5 = noon).
As you can see, no format is stored. Format is applied when dates are
displayed to users. This is true for both Jet and SQL Server.
> I built my querydef like this -> UPDATE MarsUsers.tblMarsImport SET
> ExtractDte='" & Me.bxExtractDte & "'"
> and the users enters the date like this -> 11/10/2012
> the passthru runs and the value in the ExtractDte field in the
> SQLServer table equals - 11/10/2012
>
> Perfect, thanks for your help :)
So you lucked out and ran this on a server that had US date format as its
default. This will not always be the case.
Your goal as a programmer should be to deliver date literals in a format
that will always be unambiguous and recognizable to the database engine.
Jet will correctly interpret literals supplied in US format (mm/dd/yyyy) and
ISO format (yyyy-mm-dd). The latter is preferable since it is completely
unambiguous, regardless of the regional settings on the machine where Access
is installed.
SQL Server will usually correctly interpret dates supplied in US format (but
not always) and will always correctly interpret dates supplied in ISO
format: yyyymmdd. If you wish to bullet-proof your code, you should change
it to:
... "UPDATE MarsUsers.tblMarsImport SET
ExtractDte='" & year(Me.bxExtractDte) & month(Me.bxExtractDte) &
day(Me.bxExtractDte) & "'"