Solved

mathmatic

Posted on 2003-12-08
4
173 Views
Last Modified: 2010-04-05
Hi Iam working on internet cafe project(prepaid)  Ihave 2 editboxes named value (number)  and period (time)  Iwant full  function to count the period from value .
0
Comment
Question by:sraab2004
  • 3
4 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 9902454
What do u mean by period, and what is value??
please give example of data and the output you want, example:

value = 50
period (time) = 10 hours or (time) = '12:23 pm'

Motaz
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9902461
just to agree with motaz, give a result-sample
0
 
LVL 7

Accepted Solution

by:
Motaz earned 70 total points
ID: 9902474
If I understand u, suppose that value is the money, and period is the time payed for that amount of money, and 1$ = 1 hour (60 minutes) of time, then the function could be:

function GetPeriod(Value: Double): Integer;
begin
  Result:= Round(Value * 60);
end;

example

  edPeriod.Text:= IntToStr(GetPeriod(StrToFloat(edValue.Text)));

Motaz
0
 
LVL 7

Expert Comment

by:Motaz
ID: 9902490
I forget to mention that the result is minutes, for example

if you enter 1 you will get 60 minutes
2 = 120 minutes, and so on

Motaz
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now