Home  |  Delphi .net Home  |  System.DateTime  |  ToLongTimeString Method
ToLongTimeString  
Method  
Converts the current DateTime to a long time format string
DateTime Structure
System NameSpace
CF1.  Function ToLongTimeString ( ) : String;
CF : Methods with this mark are Compact Framework Compatible
Description
The ToLongTimeString returns a string representation of the current DateTime value. The format is the long time format, with no date values.
 
It is equivalent to ToString('T');
Microsoft MSDN Links
System
System.DateTime
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  when : DateTime;

begin
  // 11:12:13 on 20th June 2004
  when := DateTime.Create(2004, 6, 20, 11, 12, 13);

  Console.WriteLine(when.ToLongTimeString);

  Console.ReadLine;
end.
Show full unit code
  11:12:13
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author