B4X FEED What I have learned about DateTime

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: What I have learned about DateTime است. این موضوع تا کنون 29 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع What I have learned about DateTime
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
29
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
What are you using B4X for? What have you learnt along the way?
Click to expand...

I am developing a POS with B4X using SQLite as the local database for the clients. I thought I am very experience in dealing with SQL and databases. I am very wrong!

In the past, I always store date and time data in table column as String in this format yyyy-MM-dd HH:mm:ss. It always work well. In some databases, we have datetime type of fields.

BUT, SQLite is a very simple database engine. There is no datetime type. You can either choose to save as TEXT or INT.

This time, I try to save the timestamp or date data as Long. I thought it will have some advantages or make things more simpler in the future.

Then now I found I am facing some issues. it is not fun to save the timestamp or datetime values as Ticks or UNIXEPOCH.

From my experience in programming since VB6, DateTime handling is always a number 1 issue. Let alone the Leap year, timezone and locale formatting, now I...



 

عقب
بالا