Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2004.11.14;
Скачать: [xml.tar.bz2];

Вниз

Что за чушь?   Найти похожие ветки 

 
Леван   (2004-10-18 10:51) [0]

Мастера, смотрите:

showmessage(formatdatetime("dd.mm.yyyy",0)) выдает 30.12.1899
А ЗАПРОС "SELECT CONVERT(DATETIME,0)" НА MSSQL
ВОЗВРАЩАЕТ 01.01.1900 (РАЗНИЦА -  2 ДНЯ)
C ЧЕМ ВАС И ПОЗДРАВЛЯЮ !!


 
Nikolay M. ©   (2004-10-18 10:52) [1]


> C ЧЕМ ВАС И ПОЗДРАВЛЯЮ !!

Спасибо. Тебя так же. Нет повода не выпить.


 
Ega23 ©   (2004-10-18 10:57) [2]

Delphi Help:

TDateTime is a used by the date and time routines to hold date and time values.

Unit

System

type  TDateTime = type Double;

Description

Most VCL objects represent date and time values using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a 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. Likewise, to increment a date and time value by a certain fractional number of days, simply add the fractional number to the date and time value.

Note: Delphi 1.0 calculated the date from year 1 instead of from 1899. To convert a Delphi 1.0 date to a Delphi 2.0 date, subtract 693594.0 from the Delphi 1.0 date. The date format changed to be more compatible with OLE 2.0 Automation.


BOL:

Values with the datetime data type are stored internally by Microsoft SQL Server as two 4-byte integers. The first 4 bytes store the number of days before or after the base date, January 1, 1900. The base date is the system reference date. Values for datetime earlier than January 1, 1753, are not permitted. The other 4 bytes store the time of day represented as the number of milliseconds after midnight.

The smalldatetime data type stores dates and times of day with less precision than datetime. SQL Server stores smalldatetime values as two 2-byte integers. The first 2 bytes store the number of days after January 1, 1900. The other 2 bytes store the number of minutes since midnight. Dates range from January 1, 1900, through June 6, 2079, with accuracy to the minute.



Что непонятно???


 
Леван   (2004-10-18 11:02) [3]

TO Ega23 :
СПАСИБО, УЖЕ ПОНЯТНО

ХОТЬЯ, ОТКРОВЕННО ГОВОРЯ , Я В ДУШЕ НАДЕЯЛСЯ, ЧТО ЭТИ ДВЕ ДАТИ БУДУТ ОДИНАКОВЫ
ВЫДИМО, ЗАБЛУЖДАЛСЯ


 
Ega23 ©   (2004-10-18 11:12) [4]

передавай дату как стринг, тогда никаких проблем с совместимостью не возникнет.


 
KSergey ©   (2004-10-18 11:23) [5]

А если взять еще какую-нибудь систему, или другие (более ранние) версии дельфи/SLQServer"а - то станет видно, что там эти даты еще другее ;) Ну и что?



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

Форум: "Базы";
Текущий архив: 2004.11.14;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.034 c
4-1096725264
aik21
2004-10-02 17:54
2004.11.14
Проверка, выдвинута ли дверца CD.


14-1098881227
Snip
2004-10-27 16:47
2004.11.14
Права в NTFS


14-1098448011
Qwest
2004-10-22 16:26
2004.11.14
Задачи.


1-1098942384
CrazyHacKeRs
2004-10-28 09:46
2004.11.14
Виртуальный DataSet


14-1098776503
ИМХО
2004-10-26 11:41
2004.11.14
Проиграть DVD на CD-ROM-е





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский