MS-SQL Database problem
Mark Wieder
mwieder at ahsoftware.net
Thu Jul 6 13:34:49 EDT 2006
Ton-
Monday, July 3, 2006, 9:37:30 AM, you wrote:
> Hi, fellow Revolutionaires...
> I have a strange problem:
> I'm using RR 2.7.2 Enterprise on OS X 10.4.7
> I'm connecting to a SQL Server through an ODBC connection, no problem
> so far.
> When I retrieve data from the SQL Server, all fields come over just
> fine, except DateTime fields...
> There are 2 of these fields, each containing a value like "28-06-2006
> 00:00"
> When I use the code below to get the data, the value I get for the
> date is truncated and changed to "2006-06-"...
DateTime formats on SQLServer are IMO a bit weird, and I've run into
conversion problems with them before, too. Not just in rev. I believe
SQLServer by default uses MDY encoding, which might explain why it's
stopping when it gets to trying to convert the 28th month. You can
issue a DATEFORMAT command to SQLServer on a per-connection basis to
change this, no matter what format the dates are stored in:
SET DATEFORMAT DMY
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list