使用日期戳创建表 [英] Create table using the datestamp
问题描述
如何使用当前日期戳创建表?我希望日期戳的格式为
How to create a table using current date stamp? I want the format of date stamp to be
MM/DD/YYYY
MM/DD/YYYY
假设我要使用该格式:确切的代码是什么?
我想使用该日期戳代替我的数据库名称,而不是表格?
Let's say I want to use that format: what is the exact code for that?
Instead of table, I want to use that datestamp to be my database name?
推荐答案
我想使用该日期戳代替我的数据库名?
Instead of table, i want to use that datestamp to be my database_name?
将具有高波动性的数据作为数据库名称永远不是一个好主意. (您不希望每年的每一天都有一个全新的数据库).
Never a good idea to put data of high volatility as a database name. (You do not want a brand new database for every day of every year).
您可以向表中添加一列,并且它必须为TEXT
,INTEGER
或REAL
.
You can add one column to your table(s), and it must be TEXT
, INTEGER
, or REAL
.
如果使用TEXT
,则只有某些格式可以正常工作. MM/DD/YYYY
不是这些格式之一,因为06/12/1945
会之前 07/05/2014
If using TEXT
, only certain formats work correctly. MM/DD/YYYY
is not one of those formats because 06/12/1945
would be before 07/05/2014
这篇关于使用日期戳创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!