Converter

Delphi

11/02/2003

Bom dia !!
Tenho uma string :
11/02/03 como faço para converte-la pra timestamp ????

Obrigado !!!


Anonymous

Anonymous

Curtidas 0

Respostas

Anonymous

Anonymous

11/02/2003

Converts a string to a TDateTime value.

Unit

Sysutils

Category

date/time routines

function StrToDate(const S: string): TDateTime;

Description

Call StrToDate to parse a string that specifies a date. If S does not contain a valid date, StrToDate raises an EConvertError exception.

S must consist of two or three numbers, separated by the character defined by the DateSeparator global variable. The order for month, day, and year is determined by the ShortDateFormat global variable--possible combinations are m/d/y, d/m/y, and y/m/d.

If S contains only two numbers, it is interpreted as a date (m/d or d/m) in the current year.

Year values between 0 and 99 are converted using the TwoDigitYearCenturyWindow global variable. If TwoDigitYearCenturyWindow is 0, year values between 0 and 99 are assumed to be in the current century. If TwoDigitYearCenturyWindow is greater than 0, its value is subtracted from the current year to determine the “pivot”; years on or after the pivot are kept in the current century, while years prior to the pivot are moved to the next century. For example:


GOSTEI 0
Anonymous

Anonymous

11/02/2003

Será que naum dah pra ser soh:
Tipow a data está em um edit, certo?
Tenta
Data: String;
Edit1.Text:=StrToTimeStamp;


GOSTEI 0
POSTAR