473,324 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Saving times

I'm trying to save a time (08:01 for example) to a Data/Time field
(formatted Short Time) in an Access table using VB.NET. The problem is
that even when I write this time to a dataset, it winds up saving as
#08/28/2003 08:01 AM# in the database, where the date is today's date. In
plain ol' VB6, I am able to write 08:01 to the database with no date. Is
there any way to write the time only in VB.NET?
Jul 19 '05 #1
1 1335
you just need to format the DateTime when you convert it to a string.

See
http://msdn.microsoft.com/library/en...ringTopic1.asp

probably you want something like

System.DateTime.Now.ToString("t")

"Chris Huddle" <ch*****@timeplus.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I'm trying to save a time (08:01 for example) to a Data/Time field
(formatted Short Time) in an Access table using VB.NET. The problem is
that even when I write this time to a dataset, it winds up saving as
#08/28/2003 08:01 AM# in the database, where the date is today's date. In
plain ol' VB6, I am able to write 08:01 to the database with no date. Is
there any way to write the time only in VB.NET?

Jul 19 '05 #2

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

Similar topics

6
by: James | last post by:
when i right click and try to save a picture from my web site it some times defaults the name and file type to 'unknown' bmp. the file is really a jpeg that i am using the .binarywrite to display...
45
by: Stephen Poley | last post by:
People in these groups, and on web-pages, not infrequently suggest that it is worthwhile cutting down on white-space and comments in HTML and CSS in order to reduce loading times. I and others have...
3
by: Filip Lyncker | last post by:
Hi group , I need a function to convert a given local time to the correct Universal Time ( UTC/GMT). The problem is the Daylight Saving Times(DST). Unix/Linux uses the Olson TZ database wich...
14
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
2
by: Mr Pekka Niiranen | last post by:
Hi, is it possible to get the two annual daylight saving times (day, month and time) from Python by giving location in some country/location string ("Europe/Finland" for example). I need to...
3
by: ajaycfd | last post by:
hi all, I need to implement the following functionality in asp. I have got an asp page which renders some html onto the browser.Now instead of rendering the html to the browser i should save...
3
by: bernhard Hoyler | last post by:
Hi, I would like to determine whether at a certain time point in time the daylight savings time is in effect. This means such a logic should show that today (16-Nov-2007) no daylight savings...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, I have a web application that will be hosted on servers with timezones configured to EST with daylight saving. My application takes an XML datafeed that contains times in GMT (also with...
2
by: MoroccoIT | last post by:
I am saving a value ID using sessions on this feedback Form, but at times, if the visitor takes too long to type a a feedback, the session times out and the user received an error message. Please...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.