Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.06.17;
Скачать: CL | DM;

Вниз

DateTime   Найти похожие ветки 

 
vajo   (2002-06-05 11:15) [0]

37047.532 -> это " 05.06.2001 12:46:04 ".
А если есть " 05.06.2001 12:46:04 ", то как получить число (37047.532)


 
Kaban   (2002-06-05 11:17) [1]

function StrToDateTime(const S: string): TDateTime;

Description

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

The S parameter must be in the MM/DD/YY HH:MM:SS format. Specifying AM or PM as part of the time is optional, as are the seconds. Use 24-hour time (7:45 PM is entered as 19:45, for example) if AM or PM is not specified.

Y2K issue: The conversion of two-digit year values is determined by the TwoDigitYearCenturyWindow variable. For more information, see StrToDate.

Note: The format of the date and time string varies when the values of date/time formatting variables are changed.


 
Anatoly Podgoretsky ©   (2002-06-05 11:20) [2]

FloatToStr


 
Kaban   (2002-06-05 11:22) [3]

2 Anatoly Podgoretsky
А при чем тут FloatToStr?


 
MBo ©   (2002-06-05 13:29) [4]

>Kaban
DateTime=Double


 
Kaban   (2002-06-05 13:38) [5]

2 MBo
Сам знаю, и что дальше?


 
MBo ©   (2002-06-05 13:45) [6]

edit1.text:=floattostr(now);
получается 37412.69536875

edit1.text:=formatfloat("00000.000",StrTodateTIme("05.06.2001 12:46:04"));
==> 37047.532


 
Kaban   (2002-06-05 13:55) [7]

>>37047.532 -> это " 05.06.2001 12:46:04 ".
>>А если есть " 05.06.2001 12:46:04 ", то как получить число (37047.532)

Т.е. у человека уже есть строка и он хочет получить число
Вот здесь и пригодится StrTodateTIme
а floattostr(now) тут совершенно не причем




 
MBo ©   (2002-06-05 14:11) [8]

Согласен



Страницы: 1 вся ветка

Текущий архив: 2002.06.17;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.018 c
1-55120
PTE
2002-06-06 10:15
2002.06.17
Как по нажатию кнопки удалить процедуру из кода программы?


1-55182
jenbond
2002-06-05 01:34
2002.06.17
Разница в датах


1-55159
Agent Smith
2002-06-04 14:36
2002.06.17
Свяязь форм


3-55005
Proton
2002-05-22 21:03
2002.06.17
Ошибки


3-55045
3asys
2002-05-23 14:54
2002.06.17
Как программно вызвать диалог создания строки подключения?