[sqlite] current_timestamp locale

2017-10-16 Thread Stephen Chrzanowski
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

Re: [sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread Wilson, Ronald
> 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

Re: [sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread D. Richard Hipp
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

[sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread Wilson, Ronald
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

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Eric Minbiole
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. >

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Eric Minbiole
> 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,

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Doug Currie
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

[sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Sam Carleton
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

Re: [sqlite] CURRENT_TIMESTAMP value in single transaction

2007-08-28 Thread Kees Nuyt
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.

Re: [sqlite] CURRENT_TIMESTAMP value in single transaction

2007-08-28 Thread Dennis Cote
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

[sqlite] CURRENT_TIMESTAMP value in single transaction

2007-08-28 Thread Brandon, Nicholas \(UK\)
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

Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Murray @ PlanetThoughtful
[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

Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Derrell . Lipman
"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

Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread rbundy
users@sqlite.org | | cc: | | Subject: [sqlite] CURRENT_TIMESTAMP records / displays

[sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Murray @ PlanetThoughtful
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

[sqlite] current_timestamp?

2004-11-12 Thread Joseph Bruni
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