473,378 Members | 1,688 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,378 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 1336
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.