SQLite Forum

Feature request: pragma for changing the precision / format of CURRENT_TIMESTAMP to YYYY-MM-SSTHH:MM:SS.SSS
Login
create table TEST (
  mtime timestamp **default CURRENT_TIMESTAMP**
);

or select CURRENT_TIMESTAMP;

currently always returns datetime value as "**YYYY-MM-DD HH:MM:SS**"

but **I would like** it like this: "**YYYY-MM-DDTHH:MM:SS.SSS**"

the **workaround "strftime( '%Y-%m-%dT%H:%M:%fZ', 'now' )" is a bit clumsy**:

create table TEST (
  mtime timestamp **default( strftime( '%Y-%m-%dT%H:%M:%fZ', 'now' ) )**
);

or select strftime( '%Y-%m-%dT%H:%M:%fZ', 'now' );

thanks a lot with best regards

maassg