Mega Code Archive

 
Categories / Delphi / ADO Database
 

Ms jet de tarih formatı ve kullanımı

Access tablonuzu ms jet ile programa bağlıyorsanız aşağıdaki bilgiler faydalı olabilir. tarih metni Önünde ve arkasında rakam işaretleri (#) bulunan geçerli biçimdeki herhangi bir karakter dizisidir. Geçerli biçimler, kodlarınızın yerel ayarlarında belirlenmiş olan tarih biçimi ya da evrensel tarih biçimidir. Örneğin, #31/12/92#, uygulamanızın yerel ayarı Türkiye olduğunda, 31 Aralık 1992 tarihini temsil eden bir tarih metnidir. Farklı ulusal diller arasında geçiş yeteneğini artırmak için tarih metinlerini kullanın. When you specify the criteria argument, date literals must be in U.S. format, even if you are not using the U.S. version of the Microsoft® Jet database engine. For example, May 10, 1996, is written 10/5/96 in the United Kingdom and 5/10/96 in the United States. Be sure to enclose your date literals with the number sign (#) as shown in the following examples. To find records dated May 10, 1996 in a United Kingdom database, you must use the following SQL statement: SELECT * FROM Orders WHERE ShippedDate = #5/10/96#; You can also use the DateValue function which is aware of the international settings established by Microsoft Windows®. For example, use this code for the United States: SELECT * FROM Orders WHERE ShippedDate = DateValue('5/10/96'); And use this code for the United Kingdom: SELECT * FROM Orders WHERE ShippedDate = DateValue('10/5/96'); -------------------------------------------------------------------------------- Note If the column referenced in the criteria string is of type GUID, the criteria expression uses a slightly different syntax: WHERE ReplicaID = {GUID {12345678-90AB-CDEF-1234-567890ABCDEF}} Be sure to include the nested braces and hyphens as shown.