问题描述
我有以下字段
1> 作品名称 - Varchar2> 时间标记我想用上述字段创建一个表.
TimeStamp 数据类型是什么
如何向表中插入时间戳值.
插入数据时时间戳值是什么或如何获取时间戳.
我曾在 SQLite 上工作过,但没有任何将时间戳作为字段添加到表中的经验 &增加价值.
什么样的CREATE
&我应该使用 INSERT
语句吗?
Sqlite 数据库中可用的数据类型有限,所以我认为对日期有用的是整数 - 这将接受长值(动态调整其大小),因此日期存储日期的毫秒值,当从数据库中读取毫秒值时,可以轻松地重新构造日期.
I have the following fields
1> WorkName - Varchar 2> TimeStap
I wanted to create a Table with the above fields.
What will be the TimeStamp datatype
How can I insert timestamp values to the table.
What will the timestamp value while inserting data or how to fetch the timestamp.
I have worked on SQLite but don't have any experience on adding TimeStamp as a field to the table & adding values to that.
What kind of CREATE
& INSERT
statements should I use?
There are limited datatypes available in a Sqlite Database, so the one I find useful for dates is integer - this will accept long values (dynamically adjusts its size) so for dates store the milliseconds value of a date and the date can be easily reconsituted when reading the millisecond values back out of the database.
这篇关于在 SQLite for Android 中插入时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!