Re: Format Seconds
- From: "Finn Tolderlund" <no@xxxxxxx>
- Date: Wed, 27 Apr 2005 23:38:19 +0200
"Doug Olson" <doug.olson@xxxxxxxxxxxxx> skrev i en meddelelse
news:42700065$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> Is there a quick way or component to take the time in-between two DateTime
> arguments and format it like this:
> 00:00:00
> Where 123 seconds would be 00:02:03
var
Diff: TDateTime;
begin
Diff := Now;
Sleep(3000);
Diff := Now - Diff;
// Use the user's locale settings
Caption := FormatDateTime('hh:nn:ss', diff);
// always use : regardless of user's locale settings
Caption := FormatDateTime('hh":"nn":"ss', diff);
--
Finn Tolderlund
.
Relevant Pages
- Re: how to get 0.000001 with printf?
... >> number" format in programs such as Microsoft Excel. ... > "diff" on the various intermediate files generated by the 2 versions. ... > "microsoft" format, so diff was throwing up a lot of output. ... be my first choice of language to implement the filter. ... (comp.lang.c) - Re: DateFormat (dd-mmm-yyyy) (dd-mmm-jjjj) Problem.
... my application try to set data format as dd-mm-yyyy and in the different ... excel is not understanding ... locale settings. ... (microsoft.public.excel.programming) - Re: Read data with decimal point "," instead of the english "."
... The first form interprets the locale settings in your current ... But this only controls the format of output strings ... Analyser, Optical Spectrum Analyser, ...) ... To read this data with gnuplot I have to convert every file into a gnuplot ... (comp.graphics.apps.gnuplot) - Re: A VB.NET Critique
... thank you for taking some time to read the critique. ... fixed to US format. ... interactively at the Windows 2000 Server console, ... locale settings and the server was using the US locale settings. ... (comp.programming) - Re: event update
... > (succession through their dateTime value). ... > On the other hand, if you just need the SUM up to the datetime, a running ... >>I have a feild that I want to be updated from another feild in a form, ... >> way the current count of the next week starts out with Diff added into it. ... (microsoft.public.access.forms) |
|