Re: Count Time hours, minutes, seconds

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I code for a call center, but no way would I work on one. They want abandon
rates broken down to favourite biscuit and colour of underwear. If you get
moved onto Pod 5, the "Pod of Death", you're in serious trouble.

Anyway, you can use the DATETIME() function.

lnStart = DATETIME()
** do stuff
lnPeriod = DATETIME() - lnStart

lnPeriod gives the interval between current time and start time in seconds.
3600 secs in an hour, 60 secs in a min, and the INT() function and %
operator will help you roll your own function. Probably a much newer and
better way to do this, but think of the value of the mental excercise.

Might be better to store this value as seconds for your purposes anyway.

Cheers,
Neil


"TonySper" <tsperduti@xxxxxxxxxxxxxxxxxxx> wrote in message
news:Rfu6h.29458$lY5.10095@xxxxxxxxxxxxxxxxxxxxxxxxx
I would like to build up a counter that had a hour, minute, and second
display. Something like a command to start the timer and then a
command to stop the time then keep adding this time to a total time
and have a display that showed the time in live time while a user
types into a memo field. The idea is to add the time that a user types
into the memo field in order to keep track of how long they are
actually working. The start and stop is in case they have to answer
the phone while they are typing so as to not count this time until he
gets off the phone and starts working again. Is there anything out
there that I could copy.
TonySper




.



Relevant Pages

  • Count Time hours, minutes, seconds
    ... command to stop the time then keep adding this time to a total time ... and have a display that showed the time in live time while a user ... The idea is to add the time that a user types ... into the memo field in order to keep track of how long they are ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Dates
    ... Create SqlParameter objects for the parameters and add them to the Parameters collecion of the command. ... The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. ... System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Console application switches for argument values?
    ... On the DEBUG tab in the text box labeled "Command line arguments:" enter ... DateTime end = DateTime.Now; ... bool good = true; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Insert Date
    ... To be on the safe side, you should use parametrised sql insert command. ... SqlCommand cmd = new SqlCommand("INSERT INTO Table (..., datecolumn) VALUES ... You should convert your date to DateTime type: ... > I have a column with data type datetime. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: File.mtime <=> DateTime.strptime()
    ... is a DateTime, ... require 'alib' ... main programs that support usage, logging, command line and option parsing in seconds ...
    (comp.lang.ruby)