Вниз
Скачать: CL | DM;

Операции с датой   Найти похожие ветки 

← →
KyRo   (2006-03-31 13:51) [0]

Подскажите как от какой небуть даты отнять 3 месяца ?


← →
Ega23 ©   (2006-03-31 13:53) [1]

Date:=IncMonth(Date, -3);


← →
KyRo   (2006-03-31 14:31) [2]

Из за чего у меня функция Date возвращзает не дату а 380921 или что то такое ?


← →
Johnmen ©   (2006-03-31 14:33) [3]


> Из за чего у меня функция Date возвращзает не дату а 380921
> или что то такое ?


Клавиша F1 не работает...


← →
KyRo   (2006-03-31 14:49) [4]

Хелпа и примеров у меня в делфи нет !!


← →
Johnmen ©   (2006-03-31 14:53) [5]

А выход в интернет есть?


← →
KyRo   (2006-03-31 14:54) [6]

А я щас где ???????????7


← →
balepa ©   (2006-03-31 14:58) [7]


> KyRo   (31.03.06 14:31) [2]
> Из за чего у меня функция Date возвращзает не дату а 380921
> или что то такое ?

procedure TForm1.Button1Click(Sender: TObject);
var
 d: TDateTime; //Double
 s: TDate; //это Double
begin
 s:= Date;
 D:= Now; //or D:= Date
 ShowMessage(DateToStr(S));
 ShowMessage(DateTimeToStr(D));
end;


← →
ANB ©   (2006-03-31 14:58) [8]


> KyRo   (31.03.06 14:31) [2]
> Из за чего у меня функция Date возвращзает не дату а 380921
> или что то такое ?

Дата. DateTimeToStr() рулит.


← →
balepa ©   (2006-03-31 15:00) [9]


> KyRo   (31.03.06 14:49) [4]
> Хелпа и примеров у меня в делфи нет !!

На:
TDateTime represents a date-and-time value in the Delphi language.
Unit
System
Delphi syntax:
type TDateTime = type Double;
Description

Most CLX objects represent date and time values using a TDateTime value. In Delphi, TDateTime is a type that maps to a Double. In C++, the TDateTime class corresponds to the Delphi TDateTime type.

The integral part of a Delphi TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of the TDateTime value is fraction of a 24 hour day that has elapsed.

Following are some examples of TDateTime values and their corresponding dates and times:

0 12/30/1899 12:00 am
2.75 1/1/1900 6:00 pm
-1.25 12/29/1899 6:00 am
35065 1/1/1996 12:00 am
To find the fractional number of days between two dates, simply subtract the two values, unless one of the TDateTime values is negative. Similarly, to increment a date and time value by a certain fractional number of days, add the fractional number to the date and time value if the TDateTime value is positive.
When working with negative TDateTime values, computations must handle time portion separately. The fractional part reflects the fraction of a 24-hour day without regard to the sign of the TDateTime value. For example, 6:00 am on 12/29/1899 is –1.25, not –1 + 0.25, which would be –0.75. There are no TDateTime values between –1 and 0.

Note: Delphi 1.0 calculated the date from year 1 instead of from 1899. To convert a Delphi 1.0 date to a TDateTime value in later versions of the Delphi language, subtract 693594.0 from the Delphi 1.0 date.


← →
SergP.   (2006-03-31 15:04) [10]


> Подскажите как от какой небуть даты отнять 3 месяца ?


А что такое месяц?



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

Скачать: CL | DM;



Память: 0.47 MB
Время: 0.027 c
1-1141592070
TStas
2006-03-05 23:54
2006.04.16
Как поместь в рес файл wav и, главное, достать потом его


3-1140428401
Shlomo
2006-02-20 12:40
2006.04.16
Ошибка: The conversion of a chat data type to a datetime data typ


2-1144232434
Std
2006-04-05 14:20
2006.04.16
РАбота с несколькими формами


15-1143376085
mfender
2006-03-26 16:28
2006.04.16
Пытаюсь вспомнить, как называются...


1-1141990138
abhtr
2006-03-10 14:28
2006.04.16
Ошибка при формирвании отчета в Word2000




   Наверх