473,800 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox calculation

23 New Member
Hi ,

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

Plz provide me code or javascript..... ..

Plz help me ........

Rgds,

Nusrath.
Nov 17 '07 #1
10 2905
acoder
16,027 Recognized Expert Moderator MVP
Use the split method to split the string value from the textbox using ":" as the delimiter.

Use the resulting array to calculate the average.
Nov 17 '07 #2
nussu
23 New Member
Hi ,

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

In 4th textbox the average also has to fisplay in time format only i.e in HH:MM:SS.

Plz provide me code or javascript..... ..

Plz help me ........




Rgds,

Nussu.
Nov 18 '07 #3
Markus
6,050 Recognized Expert Expert
You've asked this 3times in as less days.

The reason your question isn't getting answered is because it is clear you lack any knowlege in coding with javascript.

We, at tsDN, are not here to provide you with complete code; we are here to assist you and give you a push(in your case a kick) in the right direction.

Please go read some tutorials, many can be found on the big interwebs, and try it yourself.

mark.
Nov 18 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
Threads merged. Please do not double/triple post especially after receiving a response.
Nov 18 '07 #5
nussu
23 New Member
Hi ,

I need a javascript..... .. or........... code.

i have 4 textbox's vertically , in that in first 3 textbox's i am entering values in time formati.e in HH:MM:SS .There is no am/pm after time format.

for ex : a textbox has to accept only time format as 23:00:00 .

Now in textbox4 i need to calculate average of the above 3 textbox's i.e average of 3 textbox's time format whihc is in HH:MM:SS format.

once i comeout of 3rd textbox the average of above 3 textbox's has 2 display in 4th textbox.

In 4th textbox the average also has to display in time format only i.e in HH:MM:SS.

Plz provide me code or javascript..... ..

Plz help me ........




Rgds,

Nusrath.
Nov 19 '07 #6
gits
5,390 Recognized Expert Moderator Expert
threads merged again ... DON'T multipost your question on the same topic ... to bump up your question you may reply to your own post ... and wait for answers ... did you made an attempt for yourself already? please post the code you have so far ... or ask a specific question regarding the response that you already have with the split-method ...

regards
gits
Nov 19 '07 #7
nussu
23 New Member
Ya i am new to .net and javascript.....
I m fresher.......
Nov 19 '07 #8
acoder
16,027 Recognized Expert Moderator MVP
You've got to make an attempt yourself first and we'll help you with any problems that you might have with your code.

Show us what code you have so far.

Also, see post #2 in this thread for some ideas on how to go about solving the problem.
Nov 19 '07 #9
nussu
23 New Member
Hi,

I have time format in HH:MM:SS in a textbox , I need to get first two digits from this time format .

Plz help using javascript.

Regards,

Nussu
Dec 6 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
14548
by: John Sheppard | last post by:
Hi there Does anyone know how to fill a bound textbox automaticlly. In an unbound textbox I would put in the control source =Sum(price, tax) (or some such function) and access updates it automaticlly. Is there a way to do the same thing on a bound textbox so that it is automaticly updated?
2
1315
by: DotNetJunkie | last post by:
Hi NG, I want to pass a very long string to a multilined TextBox. After doing this, I want to resize the TextBox vertically, so that the text fits into the TextBox exactly. Any ideas? I need it for a custom MessageBox. Thank you Rudi
14
7613
by: Adam Clauss | last post by:
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText. As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0. ...
6
4303
by: Agnes | last post by:
For i = 1 to 5000 Me.txtCounter.text = i 'As I found the textbox didn't update itself, I add (Me.txtCounter.update) '.... some calculation statment end for Me.txtcounter.update sometimes work , sometimes doesn't , I saw the textbox show "289" and then stop , but the statment runs very well.
0
1179
by: petri | last post by:
Could any one say me,how to create a row dynamically with a textbox and comobox in a button click in a grid.Also i need to create the textbox and combobox with id as i need to do calculation based on the input given to the textbox and input selected in combobox.pls could any have idea. thanks to all from, petri
10
2483
by: garyusenet | last post by:
I have a multiline textbox. The size of the text box should be 75 characters wide, and 5 lines in height like this: - <---75 characters--> <---75 characters--> <---75 characters--> <---75 characters--> <---75 characters-->
10
1701
by: hacorbin | last post by:
I have a VB.NET program I am creating that sums 7 textboxes and displays their total in a total textbox. code: Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click total.text = (Convert.ToInt32(rt1.Text) + Convert.ToInt32(rt2.Text) + Convert.ToInt32(rt3.Text) + Convert.ToInt32(rt4.Text) + Convert.ToInt32(rt5.Text) + Convert.ToInt32(rt6.Text) + Convert.ToInt32(rt7.Text)) What I want...
1
3866
by: danielgoss | last post by:
Hi I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an inputbox when the report opens. I then want to use the value inputted in a DSUM calculation on the same form. The hidden textbox is called tbHolddate, its control source is: =InputBox() The textbox that calculates a value using a DSUM control...
2
1161
by: nussu | last post by:
Hi, A textbox has to accept only numeric values by using validation controls in .net 2.0 Plz help me ... Regards, Nussu
7
9218
by: vinay2110 | last post by:
i m new to .net programing and dont know how to apply mathematic calculation on the text box. i has the idea to do this thing using auto post back but i dont know what is the exact syntax which will perform the required operation like add, subtract, %calculation.
0
9690
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
9551
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
10505
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
10253
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,...
0
10033
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
9085
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
7576
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2945
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.