Home  |  Delphi .net Home  |  System.DateTime  |  ToShortDateString Method
  
ToShortDateString  
Method  
Converts the current DateTime to a short date format string
DateTime Structure
System NameSpace
CF1.  Function ToShortDateString : String;
CF : Methods with this mark are Compact Framework Compatible
Description
The ToShortDateString returns a string representation of the current DateTime value. The format is the short date format, with no time values.
 
It is equivalent to ToString('d');
Microsoft MSDN Links
System
System.DateTime
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  when : DateTime;

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

  Console.WriteLine(when.ToShortDateString);

  Console.ReadLine;
end.
   20/06/2004
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author