473,651 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Times in SQL Server

I am using an MS Access front end to input data into a SQL server
database. From Access I am generating an update query utilising an
inline function. My problem is that when I update a time value,
instead of updating the field with something like 08:00:00 it updates
it to 1/1/1900 08:00:00. Is there a way to force the update to only
use the hours minutes and seconds and ignore the date part?

Any help would be greatly appreciated.

Regards
Trevor

Jun 9 '06 #1
1 1052

tr***********@g mail.com wrote:
I am using an MS Access front end to input data into a SQL server
database. From Access I am generating an update query utilising an
inline function. My problem is that when I update a time value,
instead of updating the field with something like 08:00:00 it updates
it to 1/1/1900 08:00:00. Is there a way to force the update to only
use the hours minutes and seconds and ignore the date part?

Any help would be greatly appreciated.

Regards
Trevor


There is no SQL Server datatype that stores only the time without the
date, so the answer is no. The solution is to ignore the date portion
when you use the value -- not when you insert/update it.

Jun 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1623
by: Abby Lee | last post by:
My code does what I want (works unless there is a lot of volume...works for this month cause not a lot of items marked paid yet...) but the page times out for last month because there is just so many items. Is there a better way to do this? my page gets all distinct Oganizations. within each organization it gets each distinct Fund within each fund it gets each distinct Program then it lists each item that is paid for the month being...
5
2522
by: Florin | last post by:
Hi, I am experiencing some problems accessing an Oracle database through OLE DB from an MTS application using OpenWithServiceComponents (which is supposed to give me connection pooling). When I connect to a SQL Server database it only takes 3.1 ms to open a connection, while with Oracle it takes 15.5 ms (both DB's running on the same machine). Am I doing something wrong, am I missing something here? I have tried to use the plain Open...
1
2080
by: Anthony | last post by:
Here is a debate we have been having at work about the design of our timeclock database application. We have built an online timeclock system for companies to use to keep track of their employees hours. In brief, an employee can clock in and clock out by loggin through the site. All of their work dates are recorded and the employeer can poll reports based on employees in/out times, calculate hours, mark the hours as paid etc. The issue...
10
2936
by: Sunny K | last post by:
Hi guys, I have a field in my DB called EventDate as a DateTime field, therefore it holds both the date and time together like this: '2004-10-14 08:42:57.000'. I need to add together all the times in this column for a particular date range (BETWEEN). Any suggestions will be great.
10
3392
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void AddMinimunWageStipen(string payrollid,double amount) { System.Data.SqlClient.SqlConnection cn = null; System.Data.SqlClient.SqlCommand cm = null;
2
3852
by: Sara T. | last post by:
I always found that web page written by ASP.NET (VB.NET) generate error when starting at the first times. If I click refresh button on the IE again, it can work as well. What's wrong ? Again if I terminate process aspnet_wp.exe, it will generate again ONLY at the times to read page. Following is the error seen on screen:
4
3549
by: serge | last post by:
I am running a query in SQL 2000 SP4, Windows 2000 Server that is not being shared with any other users or any sql connections users. The db involves a lot of tables, JOINs, LEFT JOINs, UNIONS etc... Ok it's not a pretty code and my job is to make it better. But for now one thing I would like to understand with your help is why the same SP on the same server and everything the same without me changing anything at all in terms of SQL...
0
1227
by: Leilamir | last post by:
Hi there, We are having a problem with the following code. This asp page (as you can see in the code) creates a ServerXMLHTTP object and posts an xml object (xmlRequest) to another asp page and receives the xml response back. Practically in the application this functionality could be used many times in a row. Similar code works fine if written in client-side JavaScript (somewhere else in the application) but in this case (server-side...
9
13032
by: SAL | last post by:
I have an ASP.NET 2.0 app that takes about 17 seconds to load on first startup but then is very fast after that. As I understand it from some posts in June, this is caused by the loading of the App Domain. We have both Cold Fusion and ASP.NET apps on this server and the Cold Fusion apps do not display such slowness on their first start up of the day. Is there a way to improve the load times of ASP.NET apps? I'm having to justify to my boss...
4
1815
vikas251074
by: vikas251074 | last post by:
Loop runs indefinite times. suppose v_router = 5 is entered by user, then following code runs indefinite times i.e. record is inserted indefinite times though each have different i and v_ip_address. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>IP Management - Saving master data.</title>...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.