luke2012 Well-Known Member Licensed User Longtime User May 12, 2014 #1 Hi to all, I have a problem using SQLite Date() funcion. I have a [date] field in my db that is automatically filled by the expression : Date('Now') If a insert a new record it work fine until 23:59 (the field it's filled by today date). At 00:01 AM if I insert a new record the field is filled by the yesterday date not with the new date. It's a time zone problem about SQLite Date() function ?
Hi to all, I have a problem using SQLite Date() funcion. I have a [date] field in my db that is automatically filled by the expression : Date('Now') If a insert a new record it work fine until 23:59 (the field it's filled by today date). At 00:01 AM if I insert a new record the field is filled by the yesterday date not with the new date. It's a time zone problem about SQLite Date() function ?
Erel B4X founder Staff member Licensed User Longtime User May 12, 2014 #2 Handle the date and time values in your code. Use DateTime.Date(DateTime.Now) and add the value to the database. Or use ticks instead of strings. Upvote 0
Handle the date and time values in your code. Use DateTime.Date(DateTime.Now) and add the value to the database. Or use ticks instead of strings.
luke2012 Well-Known Member Licensed User Longtime User May 12, 2014 #3 Erel said: Handle the date and time values in your code. Use DateTime.Date(DateTime.Now) and add the value to the database. Or use ticks instead of strings. Click to expand... Thanks for your reply Erel. In which format I have to save the date within a SQLite [date] field ? Upvote 0
Erel said: Handle the date and time values in your code. Use DateTime.Date(DateTime.Now) and add the value to the database. Or use ticks instead of strings. Click to expand... Thanks for your reply Erel. In which format I have to save the date within a SQLite [date] field ?
LucaMs Expert Licensed User Longtime User May 12, 2014 #4 Erel has advised you to use ticks, then a numeric field. Upvote 0
eps Expert Licensed User Longtime User May 12, 2014 #5 luke2012 said: Thanks for your reply Erel. In which format I have to save the date within a SQLite [date] field ? Click to expand... Use ticks and then store as string. Upvote 0
luke2012 said: Thanks for your reply Erel. In which format I have to save the date within a SQLite [date] field ? Click to expand... Use ticks and then store as string.
luke2012 Well-Known Member Licensed User Longtime User May 14, 2014 #6 Thanks to all for replies I'm using this expression to obtain the today date : DateTime.Date(DateTime.now) The time zone is correct with the correct time zone or I have to set it? Upvote 0
Thanks to all for replies I'm using this expression to obtain the today date : DateTime.Date(DateTime.now) The time zone is correct with the correct time zone or I have to set it?