473,799 Members | 3,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DateTime Hell

Trying to write an itinerary program.

Got date and time from date time picker
Converted it to date variables to extract the date and the time
The form has first a textbox displaying the starting date and time via the
picker.
The next few text boxes allow user input of hours and minutes for elapsed
time of occurring events
Each text box subtracts or adds from the previous box to reveal a new date
time

Example:
The start date is 9/9/2004 2:15:00 AM
I want to subtract 4 hours and 30 minutes (a changeable user input to a
textbox) from the start date and produce a new date time (which is converted
to a string and output to a display).

The problem: How can I get the minutes to borrow from the hours, and the
hours to borrow from the date when that is required.

Also, for the output display, is it typical to use a textbox or a label
control for output results?
Nov 21 '05
10 1781
Nak
Hi,
Absolutely. But Hal gave him an answer and he seemed to skip right past

it.

Point taken, I hate it when people don't even acknowledge your reply, so I
shall shut up! ;-)

Nick.
Nov 21 '05 #11

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

Similar topics

22
2313
by: Jim Hubbard | last post by:
I am reposting a portion of a thread that I am involved in under a new topic because it seems that there are still people that believe the whole "DLL Hell" myth. I hope I can shed some light on this deception for some..... "Michael A. Covington" <look@ai.uga.edu.for.address> wrote in message news:%23tKbygELFHA.576@TK2MSFTNGP15.phx.gbl... > > "Jim Hubbard" <reply@groups.please> wrote in message
2
2181
by: Nad | last post by:
Hello, dll hell has been eliminated in .NET using assembly versioning. I am new in .NET and would like to know if there is any dll-hell-equivalent in .NET Windows or Web development environments that need to be addressed/aware of? Thank you.
55
9711
by: Jazzhouse | last post by:
Hi, How do you get the local date time as YYYYMMDDHHMMSS 14 digit string??? I am very new to C++, but if the MSDN tutorials are like that may be it is better to go with GCC... :) Ferhat
6
1561
by: Franck Diastein | last post by:
Hi, I'm soon finishing my first app, and I learned a lot :-) I'm still having trouble with dates... When I pull a date from SQL Server, I store it in a DateTime variable and when I want to display it I do this : _date.ToString("dd/MM/yyyy") and this works fine... But how do I asign to my DateTime _date variable a string entered by user aka 15/12/2004 ?
1
1726
by: GreatB | last post by:
Bill Gates died in a car accident. He found himself in Purgatory being sized up by God . .. "Well, Bill, I'm really confused on this call. I'm not sure whether to send you to Heaven or Hell. After all, you enormously helped society by putting a computer in almost every home in the world and yet you created that ghastly Windows 95. I'm going to do something I've never done before. In your case, I'm going to let you decide where you
6
8992
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference between date and datetime classes? Please, help
9
4930
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="urn:JadeWebServices/WebServiceProvider/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
4
6422
by: Michael Meckelein | last post by:
Hello, Wondering, if C# (framework 2.0) does not support parsing DateTime timezones in three letter acronyms. I would like to parse date strings like "2005 Nov 01 11:58:47.490 CST -6:00" but it seems C# does not support the timezone letters (CST). I suppose to use the symbol ZZZ for the timezone letters, but MSDE pointed out that it is not supported in C#, isn't it?
7
17075
by: sherifffruitfly | last post by:
Hi, God I hate datetime string formatting... How do I get a string of the form "04-Oct-2006", for example, from a DateTime object? Thanks a jillion, cdj
11
9841
by: Peter Holschbach | last post by:
Hi, I've the following line of code: result = DateTime.ParseExact("1999-12-01T23:59:59Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture); where I get in result "result" "02.12.1999 00:59:59" instead of teh expected "01.12.1999 23:59:59" Anybody a idea ?
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
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
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10243
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7570
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
6809
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
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
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
3
2941
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.