03-08-18, 06:05 PM
(آخر تعديل لهذه المشاركة : 03-08-18, 06:17 PM {2} بواسطة mrnooo2000.)
إقتباس :2.2. Date and Time DatatypeSQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values:
- TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
- REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.
- INTEGER as Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC.
Applications can chose to store dates and times in any of these formats and freely convert between formats using the built-in date and time functions.
https://www.sqlite.org/datatype3.htm
و هناك دوال يمكنك من خلالها تحويل النص المحفوظ فى قاعدة البيانات الى تاريخ
لتتعامل معه بالشكل المعتاد لديك
إقتباس :Date And Time Functions
SQLite supports five date and time functions as follows:
- date(timestring, modifier, modifier, ...)
- time(timestring, modifier, modifier, ...)
- datetime(timestring, modifier, modifier, ...)
- julianday(timestring, modifier, modifier, ...)
- strftime(format, timestring, modifier, modifier, ...)
https://sqlite.org/lang_datefunc.html
او يمكنك ارفاق مثال للمشكلة لديك ليتم التطبيق عليه
