Does SQLite go by users locale to insert date/time information into a row,
or is it a very specific format when using current_timestamp as a default
value?
I don't want to go start monkeying with my system settings to find out, so,
relying on those with experience.
Thanks
> Put parentheses around the strftime() function call:
>
> CREATE TABLE info(..., stamp DEFAULT (strftime('%f','now')))
>
> The extra parentheses are needed to avoid a parsing ambiguity in the
> SQL language.
>
> D. Richard Hipp
> d...@hwaci.com
Perfect!
Ron Wilson, Engineering Project
On Aug 25, 2009, at 11:04 AM, Wilson, Ronald wrote:
> Is there a way to set a default timestamp with fractional seconds?
> This gives a syntax error (obviously) but expresses my intent:
>
> CREATE TABLE info(k, v, stamp DATETIME default strftime('%Y-%m-%d
> %H:%M:%f', 'now'));
>
Put
Is there a way to set a default timestamp with fractional seconds?
This works but doesn't give fractional seconds:
CREATE TABLE info(k, v, stamp DATETIME default CURRENT_TIMESTAMP);
This gives a syntax error (obviously) but expresses my intent:
CREATE TABLE info(k, v, stamp DATETIME
Please ignore my previous post. Doug's suggestion is much better.
~Eric
Eric Minbiole wrote:
>> I would like CURRENT_TIMESTAMP to be more accurate than just one second,
>> any suggestions on how I might do that once? My solution is all a C/C++
>> interface, so all features are open to me.
>
> I would like CURRENT_TIMESTAMP to be more accurate than just one second,
> any suggestions on how I might do that once? My solution is all a C/C++
> interface, so all features are open to me.
One option would be to create and register a custom SQL function that
returned the current time,
On May 15, 2009, at 9:07 AM, Sam Carleton wrote:
> I would like CURRENT_TIMESTAMP to be more accurate than just one
> second, any suggestions on how I might do that once? My solution is
> all a C/C++ interface, so all features are open to me.
Option 1 - use: julianday('now') instead of
I would like CURRENT_TIMESTAMP to be more accurate than just one second,
any suggestions on how I might do that once? My solution is all a C/C++
interface, so all features are open to me.
___
sqlite-users mailing list
sqlite-users@sqlite.org
Hi Nick,
On Tue, 28 Aug 2007 17:39:16 +0100, you wrote:
> When enclosed in a single transaction, would inserting
> many rows into a table using the special default keyword
> 'CURRENT_TIMESTAMP' result in all of the rows
> guaranteeing the same timestamp value?
Did you try?
I did.
Brandon, Nicholas (UK) wrote:
When enclosed in a single transaction, would inserting many rows into a
table using the special default keyword 'CURRENT_TIMESTAMP' result in
all of the rows guaranteeing the same timestamp value?
If not, is there a recommended way to assign a unique value to a
When enclosed in a single transaction, would inserting many rows into a
table using the special default keyword 'CURRENT_TIMESTAMP' result in
all of the rows guaranteeing the same timestamp value?
If not, is there a recommended way to assign a unique value to a
collection of inserts in a single
[EMAIL PROTECTED] wrote:
"Murray @ PlanetThoughtful" <[EMAIL PROTECTED]> writes:
I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite 3.2.7 db
(on WinXP SP2, if that's important). I've noticed that the value being
stored in that column is being recorded / displayed
"Murray @ PlanetThoughtful" <[EMAIL PROTECTED]> writes:
> I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite 3.2.7 db
> (on WinXP SP2, if that's important). I've noticed that the value being
> stored in that column is being recorded / displayed incorrectly. For
> example, it's
users@sqlite.org
|
| cc:
|
| Subject: [sqlite] CURRENT_TIMESTAMP records / displays
Hello All,
New to the list, so please forgive if this has been discussed previously.
I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite
3.2.7 db (on WinXP SP2, if that's important). I've noticed that the
value being stored in that column is being recorded / displayed
Hello,
In the documentation for column constraints, there is an option called
"default" which could take the text "current_timestamp" as its value.
Supposedly, this will populate the column with the current time and
date. However, when I attempt to use this, my column is simply
populated with
16 matches
Mail list logo