Converter
11/02/2003
0
Bom dia !!
Tenho uma string :
11/02/03 como faço para converte-la pra timestamp ????
Obrigado !!!
Tenho uma string :
11/02/03 como faço para converte-la pra timestamp ????
Obrigado !!!
Anonymous
Curtir tópico
+ 0
Responder
Posts
13/02/2003
Anonymous
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:
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:
Responder
14/02/2003
Anonymous
Será que naum dah pra ser soh:
Tipow a data está em um edit, certo?
Tenta
Data: String;
Edit1.Text:=StrToTimeStamp;
Tipow a data está em um edit, certo?
Tenta
Data: String;
Edit1.Text:=StrToTimeStamp;
Responder
Clique aqui para fazer login e interagir na Comunidade :)