Michael Brösdorf
michael.broesdorf at web.de
Mon Jul 19 08:17:50 CDT 2004
Does it work if you enter a time including seconds directly into the linked table? If so, I would try to track down the problem using the Profiler from SQL Server. Run the append query while Profiler is running to find out what exactly is sent to the server. Comparing date/time-values is always a problem with Access and SQL-Server, because date and time are always stored as ONE number. I've come to the point where I explicitly convert any data/time-value to a string ("20041231", "1755") before I do the comparison. This way you can also solve the problems that might result from the different base-dates used in SQL Server and Access. Michael -----Ursprüngliche Nachricht----- Von: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]Im Auftrag von Martin Caro Gesendet: Montag, 19. Juli 2004 14:45 An: Access Developers discussion and problem solving Betreff: Re: [AccessD] Seconds Missing Michael Using an append query on an ODBC/Linked table. I need to retrieve the record when the user exits using a composite UserID and LoginInTime key and insert a logoff time however, the value I have stored in a global variable has seconds and the value stored in the table has been rounded to full minutes so I'm never going to retrieve the correct record unless the login was actually on the full minute. Martin ----- Original Message ----- From: "Michael Brösdorf" <michael.broesdorf at web.de> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Monday, July 19, 2004 10:21 PM Subject: AW: [AccessD] Seconds Missing How exactly are you trying to write the time to sql server (ODBC/Linked table, ADO, etc.)? Michael -----Ursprüngliche Nachricht----- Von: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]Im Auftrag von Martin Caro Gesendet: Montag, 19. Juli 2004 13:30 An: Access Developers discussion and problem solving Betreff: [AccessD] Seconds Missing Hi Folks I have spent some time in the archives and reviewing past date/time issues looking for a fix for this problem: I grab the user login time using NOW() and save it to an SQL table however any seconds apparent in Access always end up as :00 being save in my SQL table. I was using smalldatetime data type which I changed to datetime but without success. I have played with Format() a bit but maybe someone knows where my seconds have gone? Martin -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com