ITextReader.ReadDateTime

Syntax

ReadDateTime: DateTime;

Description

The ReadDateTime method reads date and time from a text file.

Example

Sub Main;

Var

File1: IFileInfo;

TextR: ITextReader;

d: DateTime;

Begin

File1:=New FileInfo.Attach("c:\New_folder\1.txt");

If File1.Exists Then

TextR:=File1.OpenTextReader;

d:=TextR.ReadDateTime;

End If;

Dispose File1;

End Sub Main;

After executing this example, the "d" variable contains date and time read from the text file 1.txt.

See also:

ITextReader